add global variable space

could in the long run move spaces functionality to the class
and since the class is global anyway, wouldn’t need this
This commit is contained in:
Torsten Ruger
2015-11-07 12:19:04 +02:00
parent b1939e9828
commit 9ebe28450b
4 changed files with 16 additions and 2 deletions

View File

@ -6,7 +6,8 @@ module Soml
reset_regs # field_def is a statement, no return and all regs
#puts statement.inspect
type , name , value = *statement
@method.ensure_local( name.first, type ) unless( @method.has_arg(name.first))
name_s = no_space( name.first )
@method.ensure_local( name_s, type ) unless( @method.has_arg(name_s))
# if there is a value assigned, process it as am assignemnt statement (kind of call on_assign)
process( s(:assignment , name , value ) ) if value
return nil