Class: Rubycc::Front::AST::StatementExpr

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

Overview

A GNU statement expression "( { block-item* } )" (a GCC extension, not ISO C). body is the AST::Block the parentheses wrap around a compound statement; the braces introduce the block's own scope, just like any compound-statement. When the block's last block-item is an expression-statement, that expression's value and type are the whole construct's; otherwise (an empty block, or a last item that is a declaration, a loop, a bare ";" and so on) the construct is void.

Instance Attribute Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



258
259
260
# File 'lib/rubycc/front/ast.rb', line 258

def body
  @body
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



258
259
260
# File 'lib/rubycc/front/ast.rb', line 258

def token
  @token
end