Class: Chelsy::Directive::StdcPragma

Inherits:
Pragma show all
Defined in:
lib/chelsy/ast.rb

Overview

STDC pragma

#pragma STDC FP_CONTRACT on-off-switch
#pragma STDC FENV_ACCESS on-off-switch
#pragma STDC CX_LIMITED_RANGE on-off-switch

Instance Attribute Summary collapse

Attributes inherited from Pragma

#pragma

Instance Method Summary collapse

Constructor Details

#initialize(name, state, **rest) ⇒ StdcPragma

Returns a new instance of StdcPragma.



1282
1283
1284
1285
1286
1287
# File 'lib/chelsy/ast.rb', line 1282

def initialize(name, state, **rest)
  @name = Syntax::StdcPragma.ensure(name)
  @state = Syntax::StdcPragmaState.ensure(state)

  super "STDC #{name} #{state}", **rest
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



1280
1281
1282
# File 'lib/chelsy/ast.rb', line 1280

def name
  @name
end

#stateObject (readonly)

Returns the value of attribute state.



1280
1281
1282
# File 'lib/chelsy/ast.rb', line 1280

def state
  @state
end