Class: Nendo::SourceInfo
- Inherits:
-
Object
- Object
- Nendo::SourceInfo
- Defined in:
- lib/nendo.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.
206 207 208 209 210 211 212 213 |
# File 'lib/nendo.rb', line 206 def initialize @varname = nil @sourcefile = nil @lineno = nil @source_sexp = Cell.new = Cell.new @compiled_str = nil end |
Instance Attribute Details
#compiled_str ⇒ Object (readonly)
Returns the value of attribute compiled_str.
245 246 247 |
# File 'lib/nendo.rb', line 245 def compiled_str @compiled_str end |
#expanded_sexp ⇒ Object (readonly)
Returns the value of attribute expanded_sexp.
245 246 247 |
# File 'lib/nendo.rb', line 245 def end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
245 246 247 |
# File 'lib/nendo.rb', line 245 def lineno @lineno end |
#source_sexp ⇒ Object (readonly)
Returns the value of attribute source_sexp.
245 246 247 |
# File 'lib/nendo.rb', line 245 def source_sexp @source_sexp end |
#sourcefile ⇒ Object (readonly)
Returns the value of attribute sourcefile.
245 246 247 |
# File 'lib/nendo.rb', line 245 def sourcefile @sourcefile end |
#varname ⇒ Object (readonly)
Returns the value of attribute varname.
245 246 247 |
# File 'lib/nendo.rb', line 245 def varname @varname end |
Instance Method Details
#debugPrint ⇒ Object
237 238 239 240 241 242 243 |
# File 'lib/nendo.rb', line 237 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
215 216 217 |
# File 'lib/nendo.rb', line 215 def deepCopy( sexp ) Marshal.load(Marshal.dump( sexp )) end |
#setCompiled(compiled_str) ⇒ Object
233 234 235 |
# File 'lib/nendo.rb', line 233 def setCompiled( compiled_str ) @compiled_str = compiled_str end |
#setExpanded(expanded_sexp) ⇒ Object
229 230 231 |
# File 'lib/nendo.rb', line 229 def setExpanded( ) = self.deepCopy( ) end |
#setSource(sourcefile, lineno, source_sexp) ⇒ Object
223 224 225 226 227 |
# File 'lib/nendo.rb', line 223 def setSource( sourcefile, lineno, source_sexp ) @sourcefile = sourcefile @lineno = lineno @source_sexp = self.deepCopy( source_sexp ) end |
#setVarname(varname) ⇒ Object
219 220 221 |
# File 'lib/nendo.rb', line 219 def setVarname( varname ) @varname = varname end |