module RubyBreaker::Runtime::TypeSigParser
Constants
- PARSER
Public Class Methods
parse(str)
click to toggle source
This is a simple redirecting method for parsing type signature. The only special thing about this method is that, if there are multiple lines in the signature, it will look at each line and construct a MethodListType to represent the intersection type.
# File lib/rubybreaker/runtime/typesig_parser.rb, line 23 def self.parse(str) meth_types = [] # Get caller information and set the global location my_caller = caller[1] if my_caller file,line,junk = my_caller.split(":") Position.set(file,line,-1) end return PARSER.parse(str).value rescue => e puts e end