Class: LanguageServer::Project::Parser

Inherits:
Ripper
  • Object
show all
Defined in:
lib/language_server/project/parser.rb

Defined Under Namespace

Classes: Result

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(src, path) ⇒ Parser



25
26
27
28
29
30
31
# File 'lib/language_server/project/parser.rb', line 25

def initialize(src, path)
  super(src, path && path.remote_path)

  @path = path
  @result = Result.new
  @current_constants = []
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



23
24
25
# File 'lib/language_server/project/parser.rb', line 23

def result
  @result
end

Class Method Details

.parse(src, path = nil) ⇒ Object



18
19
20
# File 'lib/language_server/project/parser.rb', line 18

def parse(src, path = nil)
  new(src, path).tap(&:parse).result
end