Module: Ibex::IR

Defined in:
lib/ibex/ir.rb,
lib/ibex/ir/lexer_ir.rb,
lib/ibex/ir/serialize.rb,
lib/ibex/ir/validator.rb,
lib/ibex/ir/grammar_ir.rb,
lib/ibex/ir/automaton_ir.rb,
lib/ibex/ir/validator/base.rb,
lib/ibex/ir/parser_contract.rb,
lib/ibex/ir/validator/lexer.rb,
lib/ibex/ir/validator/grammar.rb,
lib/ibex/ir/validator/automaton.rb,
sig/ibex/ir.rbs,
sig/ibex/ir/lexer_ir.rbs,
sig/ibex/ir/serialize.rbs,
sig/ibex/ir/validator.rbs,
sig/ibex/ir/grammar_ir.rbs,
sig/ibex/ir/automaton_ir.rbs,
sig/ibex/ir/validator/base.rbs,
sig/ibex/ir/parser_contract.rbs,
sig/ibex/ir/validator/lexer.rbs,
sig/ibex/ir/validator/grammar.rbs,
sig/ibex/ir/validator/automaton.rbs

Defined Under Namespace

Modules: Serialize, Validator Classes: Action, Automaton, AutomatonItem, AutomatonState, Grammar, GrammarSymbol, Lexer, LexerRule, ParserContract, Production, UserCodeChunk

Constant Summary collapse

LEXER_SCHEMA_VERSION =

Returns:

  • (::Integer)
1
SUPPORTED_LEXER_SCHEMA_VERSIONS =

Signature:

  • Array[Integer]

Returns:

  • (Array[Integer])
[LEXER_SCHEMA_VERSION].freeze
SCHEMA_VERSION =

Grammar IR has one active wire format. A future incompatible format change may advance this number, but the runtime never treats old formats as an alternate compatibility surface.

Returns:

  • (::Integer)
1
SUPPORTED_SCHEMA_VERSIONS =

Signature:

  • Array[Integer]

Returns:

  • (Array[Integer])
[SCHEMA_VERSION].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.deep_freeze(value) ⇒ Object

RBS:

  • (Object? value) -> Object?



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ibex/ir/grammar_ir.rb', line 14

def deep_freeze(value)
  case value
  when Array then value.each { |item| deep_freeze(item) }
  when Hash
    value.each do |key, item|
      deep_freeze(key)
      deep_freeze(item)
    end
  end
  value.freeze
end

Instance Method Details

#self?.deep_freezeObject?

RBS:

  • (Object? value) -> Object?

Parameters:

  • value (Object, nil)

Returns:

  • (Object, nil)


13
# File 'sig/ibex/ir/grammar_ir.rbs', line 13

def self?.deep_freeze: (Object? value) -> Object?