Class: Ldpath::Parser

Inherits:
Parslet::Parser
  • Object
show all
Defined in:
lib/ldpath/parser.rb

Instance Method Summary collapse

Instance Method Details

#intersection_selector ⇒ Object

x & y



169
170
171
172
173
174
175
176
# File 'lib/ldpath/parser.rb', line 169

rule(:intersection_selector) {
  (
    wsp? >>
    atomic_or_testing_or_path_selector.as(:left) >> wsp? >>
    and_op >> wsp? >>
    selector.as(:right) >> wsp?
  ).as(:intersection)
}

#union_selector ⇒ Object

x | y



179
180
181
182
183
184
185
186
# File 'lib/ldpath/parser.rb', line 179

rule(:union_selector) {
  (
    wsp? >>
    atomic_or_testing_or_path_selector.as(:left) >> wsp? >>
    or_op >> wsp? >>
    selector.as(:right) >> wsp?
  ).as(:union)
}