Method: JsDuck::CssParser#match
- Defined in:
- lib/jsduck/css_parser.rb
#match(*args) ⇒ Object
Matches all arguments, returns the value of last match When the whole sequence doesn’t match, throws exception
104 105 106 107 108 109 110 111 112 |
# File 'lib/jsduck/css_parser.rb', line 104 def match(*args) if look(*args) last = nil args.length.times { last = @lex.next } last else throw "Expected: " + args.join(", ") end end |