Class: Nendo::SourceInfo
- Inherits:
-
Object
- Object
- Nendo::SourceInfo
- Defined in:
- lib/nendo/ruby/types.rb
Instance Attribute Summary collapse
-
#compiled_str ⇒ Object
readonly
Returns the value of attribute compiled_str.
-
#expanded_sexp ⇒ Object
readonly
Returns the value of attribute expanded_sexp.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#source_sexp ⇒ Object
readonly
Returns the value of attribute source_sexp.
-
#sourcefile ⇒ Object
readonly
Returns the value of attribute sourcefile.
-
#varname ⇒ Object
readonly
Returns the value of attribute varname.
Instance Method Summary collapse
- #debugPrint ⇒ Object
- #deepCopy(sexp) ⇒ Object
-
#initialize ⇒ SourceInfo
constructor
A new instance of SourceInfo.
- #setCompiled(compiled_str) ⇒ Object
- #setExpanded(expanded_sexp) ⇒ Object
- #setSource(sourcefile, lineno, source_sexp) ⇒ Object
- #setVarname(varname) ⇒ Object
Constructor Details
#initialize ⇒ SourceInfo
Returns a new instance of SourceInfo.
277 278 279 280 281 282 283 284 |
# File 'lib/nendo/ruby/types.rb', line 277 def initialize @varname = nil @sourcefile = nil @lineno = nil @source_sexp = Cell.new @expanded_sexp = Cell.new @compiled_str = nil end |
Instance Attribute Details
#compiled_str ⇒ Object (readonly)
Returns the value of attribute compiled_str.
316 317 318 |
# File 'lib/nendo/ruby/types.rb', line 316 def compiled_str @compiled_str end |
#expanded_sexp ⇒ Object (readonly)
Returns the value of attribute expanded_sexp.
316 317 318 |
# File 'lib/nendo/ruby/types.rb', line 316 def @expanded_sexp end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
316 317 318 |
# File 'lib/nendo/ruby/types.rb', line 316 def lineno @lineno end |
#source_sexp ⇒ Object (readonly)
Returns the value of attribute source_sexp.
316 317 318 |
# File 'lib/nendo/ruby/types.rb', line 316 def source_sexp @source_sexp end |
#sourcefile ⇒ Object (readonly)
Returns the value of attribute sourcefile.
316 317 318 |
# File 'lib/nendo/ruby/types.rb', line 316 def sourcefile @sourcefile end |
#varname ⇒ Object (readonly)
Returns the value of attribute varname.
316 317 318 |
# File 'lib/nendo/ruby/types.rb', line 316 def varname @varname end |
Instance Method Details
#debugPrint ⇒ Object
308 309 310 311 312 313 314 |
# File 'lib/nendo/ruby/types.rb', line 308 def debugPrint printf( "=== sourceInfo === \n" ) printf( " varname = %s\n", @varname ) printf( " sourcefile = %s\n", @sourcefile ) printf( " lineno = %s\n", @lineno) printf( " compiled_str = %s\n", @compiled_str ) end |
#deepCopy(sexp) ⇒ Object
286 287 288 |
# File 'lib/nendo/ruby/types.rb', line 286 def deepCopy( sexp ) Marshal.load(Marshal.dump( sexp )) end |
#setCompiled(compiled_str) ⇒ Object
304 305 306 |
# File 'lib/nendo/ruby/types.rb', line 304 def setCompiled( compiled_str ) @compiled_str = compiled_str end |
#setExpanded(expanded_sexp) ⇒ Object
300 301 302 |
# File 'lib/nendo/ruby/types.rb', line 300 def setExpanded( ) @expanded_sexp = self.deepCopy( ) end |
#setSource(sourcefile, lineno, source_sexp) ⇒ Object
294 295 296 297 298 |
# File 'lib/nendo/ruby/types.rb', line 294 def setSource( sourcefile, lineno, source_sexp ) @sourcefile = sourcefile @lineno = lineno @source_sexp = self.deepCopy( source_sexp ) end |
#setVarname(varname) ⇒ Object
290 291 292 |
# File 'lib/nendo/ruby/types.rb', line 290 def setVarname( varname ) @varname = varname end |