Class: Rubycc::Front::AST::Label

Inherits:
Data
  • Object
show all
Defined in:
lib/rubycc/front/ast.rb

Overview

A labeled statement identifier: statement (6.8.1), the target of a goto. name is the label's name and body the statement it prefixes (often the empty statement, as in "end: ;"). Distinguished from an ordinary expression-statement by two tokens of lookahead — an identifier immediately followed by ":".

Instance Attribute Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



311
312
313
# File 'lib/rubycc/front/ast.rb', line 311

def body
  @body
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



311
312
313
# File 'lib/rubycc/front/ast.rb', line 311

def name
  @name
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



311
312
313
# File 'lib/rubycc/front/ast.rb', line 311

def token
  @token
end