Module: CodeMiner::ArrayProcessor
- Included in:
- Parser
- Defined in:
- lib/codeminer/processors/array_processor.rb
Instance Method Summary collapse
- #on_array(args) ⇒ Object
- #on_qsymbols_add(args, string) ⇒ Object
- #on_qsymbols_beg ⇒ Object
- #on_qsymbols_new ⇒ Object
- #on_qwords_add(args, str) ⇒ Object
- #on_qwords_beg ⇒ Object
- #on_qwords_new ⇒ Object
- #on_symbols_add(args, string) ⇒ Object
- #on_symbols_beg ⇒ Object
- #on_symbols_new ⇒ Object
- #on_word_add(words, word) ⇒ Object
- #on_word_new ⇒ Object
- #on_words_add(words, word) ⇒ Object
- #on_words_beg ⇒ Object
- #on_words_new ⇒ Object
Instance Method Details
#on_array(args) ⇒ Object
5 6 7 |
# File 'lib/codeminer/processors/array_processor.rb', line 5 def on_array(args) ArrayExpression.new(args, extract_src_from_args(args)) end |
#on_qsymbols_add(args, string) ⇒ Object
21 22 23 |
# File 'lib/codeminer/processors/array_processor.rb', line 21 def on_qsymbols_add(args, string) args.add(SymbolExpression.convert(string)) end |
#on_qsymbols_beg ⇒ Object
55 56 57 58 59 |
# File 'lib/codeminer/processors/array_processor.rb', line 55 def on_qsymbols_beg(*) super.tap do |token| @qsymbols << token end end |
#on_qsymbols_new ⇒ Object
17 18 19 |
# File 'lib/codeminer/processors/array_processor.rb', line 17 def on_qsymbols_new ArgumentsExpression.new(SourceExtract::Partial.new(@src, lineno(), column()), @qsymbols.pop) end |
#on_qwords_add(args, str) ⇒ Object
13 14 15 |
# File 'lib/codeminer/processors/array_processor.rb', line 13 def on_qwords_add(args, str) args.add(str) end |
#on_qwords_beg ⇒ Object
49 50 51 52 53 |
# File 'lib/codeminer/processors/array_processor.rb', line 49 def on_qwords_beg(*) super.tap do |token| @qwords << token end end |
#on_qwords_new ⇒ Object
9 10 11 |
# File 'lib/codeminer/processors/array_processor.rb', line 9 def on_qwords_new ArgumentsExpression.new(SourceExtract::Partial.new(@src, lineno(), column()), @qwords.pop) end |
#on_symbols_add(args, string) ⇒ Object
29 30 31 |
# File 'lib/codeminer/processors/array_processor.rb', line 29 def on_symbols_add(args, string) args.add(SymbolExpression.convert(string)) end |
#on_symbols_beg ⇒ Object
61 62 63 64 65 |
# File 'lib/codeminer/processors/array_processor.rb', line 61 def on_symbols_beg(*) super.tap do |token| @symbols << token end end |
#on_symbols_new ⇒ Object
25 26 27 |
# File 'lib/codeminer/processors/array_processor.rb', line 25 def on_symbols_new ArgumentsExpression.new(SourceExtract::Partial.new(@src, lineno(), column()), @symbols.pop) end |
#on_word_add(words, word) ⇒ Object
33 34 35 |
# File 'lib/codeminer/processors/array_processor.rb', line 33 def on_word_add(words, word) word end |
#on_word_new ⇒ Object
37 38 39 |
# File 'lib/codeminer/processors/array_processor.rb', line 37 def on_word_new end |
#on_words_add(words, word) ⇒ Object
41 42 43 |
# File 'lib/codeminer/processors/array_processor.rb', line 41 def on_words_add(words, word) words.add(StringExpression.convert(word)) end |
#on_words_beg ⇒ Object
67 68 69 70 71 |
# File 'lib/codeminer/processors/array_processor.rb', line 67 def on_words_beg(*) super.tap do |token| @words << token end end |
#on_words_new ⇒ Object
45 46 47 |
# File 'lib/codeminer/processors/array_processor.rb', line 45 def on_words_new ArgumentsExpression.new(SourceExtract::Partial.new(@src, lineno(), column()), @words.pop) end |