Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: undefined method `line' for nil:NilClass #45

Open
gfx opened this issue Jul 23, 2018 · 0 comments
Open

Error: undefined method `line' for nil:NilClass #45

gfx opened this issue Jul 23, 2018 · 0 comments

Comments

@gfx
Copy link
Contributor

gfx commented Jul 23, 2018

Patten

!field(_, _, null: _, ...)

This is a useless pattern because of just my mistake, but it causes NoMethoderror and I think it is a bug in querly.

Environment

Ruby 2.5.1
Querly 0.11.0
macOS

Backtrace

Error: undefined method `line' for nil:NilClass
Backtrace:
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/parser-2.5.1.2/lib/parser/source/map.rb:100:in `line'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/cli/console.rb:71:in `block in loop'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/analyzer.rb:35:in `block (2 levels) in find'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:25:in `each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:28:in `block in each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:28:in `block in each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:28:in `block in each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:28:in `block in each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:28:in `block in each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/node_pair.rb:27:in `each_subpair'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/analyzer.rb:33:in `block in find'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/analyzer.rb:32:in `each'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/analyzer.rb:32:in `find'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/cli/console.rb:69:in `loop'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/cli/console.rb:27:in `start'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/lib/querly/cli.rb:68:in `console'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
  /Users/gfx/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/querly-0.11.0/exe/querly:8:in `<top (required)>'
  /Users/gfx/.rbenv/versions/2.5.1/bin/querly:23:in `load'
  /Users/gfx/.rbenv/versions/2.5.1/bin/querly:23:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant