Module: Lutaml::Lml::Grammar::Concerns::Definitions
- Includes:
- Parslet
- Included in:
- Lutaml::Lml::Grammar::Core
- Defined in:
- lib/lutaml/lml/grammar/concerns/definitions.rb
Instance Method Summary collapse
-
#braced_body(inner) ⇒ Object
Compose a brace-delimited body parser around an inner rule.
Instance Method Details
#braced_body(inner) ⇒ Object
Compose a brace-delimited body parser around an inner rule. All *_body rules share this scaffold; only the inner rule differs.
13 14 15 16 17 18 19 |
# File 'lib/lutaml/lml/grammar/concerns/definitions.rb', line 13 def braced_body(inner) spaces? >> str("{") >> whitespace? >> inner.repeat.as(:members) >> str("}") end |