class RBS::Parser
Constants
- KEYWORDS
- LexerError
- SemanticsError
- SyntaxError
Public Class Methods
buffer(source)
click to toggle source
# File rbs-2.8.2/lib/rbs/parser_aux.rb, line 20 def self.buffer(source) case source when String Buffer.new(content: source, name: "a.rbs") when Buffer source end end
parse_method_type(source, line: nil, column: nil, range: nil, variables: [])
click to toggle source
# File rbs-2.8.2/lib/rbs/parser_aux.rb, line 10 def self.parse_method_type(source, line: nil, column: nil, range: nil, variables: []) buf = buffer(source) _parse_method_type(buf, range&.begin || 0, range&.end || buf.last_position, variables, range.nil?) end
parse_signature(source, line: nil, column: nil)
click to toggle source
# File rbs-2.8.2/lib/rbs/parser_aux.rb, line 15 def self.parse_signature(source, line: nil, column: nil) buf = buffer(source) _parse_signature(buf, buf.last_position) end
parse_type(source, line: nil, column: nil, range: nil, variables: [])
click to toggle source
# File rbs-2.8.2/lib/rbs/parser_aux.rb, line 5 def self.parse_type(source, line: nil, column: nil, range: nil, variables: []) buf = buffer(source) _parse_type(buf, range&.begin || 0, range&.end || buf.last_position, variables, range.nil?) end