class Babelyoda::StringsLexer
Constants
- REGEXP
- TOKENS
Public Instance Methods
lex(str) { |TOKENS, m| ... }
click to toggle source
# File lib/babelyoda/strings_lexer.rb, line 6 def lex(str) str.scan(REGEXP).each do |m| idx = m.index { |x| x } if TOKENS[idx] == :space next end yield TOKENS[idx], m[idx] end end