Class: Syntax::ShTokenizer
- Defined in:
- lib/zena/code/default_syntax.rb
Instance Method Summary collapse
Instance Method Details
#step ⇒ Object
258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/zena/code/default_syntax.rb', line 258 def step if variables = scan(/\$\w+/) start_group :variable, variables elsif start = scan(/# \S+/) start_group :punct, '# ' start_group :method, start[2..-1] elsif start = scan(/\$ \S+/) start_group :root, '$ ' start_group :method, start[2..-1] else start_group :normal, scan(/./m) end end |