lib/delorean/engine.rb in delorean_lang-0.5.4 vs lib/delorean/engine.rb in delorean_lang-0.6.0
- old
+ new
@@ -200,11 +200,11 @@
def err(exc, msg)
raise exc.new(msg, @module_name, curr_line)
end
- def parse_check_call_fn(fn, argcount, class_name = nil)
+ def parse_check_call_fn(fn, _argcount, class_name = nil)
klass = case class_name
when nil
@m::BaseClass
when String
parse_class(class_name)
@@ -212,23 +212,9 @@
class_name
end
err(UndefinedFunctionError, "Function #{fn} not found") unless
klass.methods.member? fn.to_sym
-
- # signature methods must be named FUNCTION_NAME_SIG
- sig = "#{fn}#{SIG}".upcase.to_sym
-
- err(UndefinedFunctionError, "Signature #{sig} not found") unless
- klass.constants.member? sig
-
- min, max = klass.const_get(sig)
-
- err(BadCallError, "Too many args to #{fn} (#{argcount} > #{max})") if
- argcount > max
-
- err(BadCallError, "Too few args to #{fn} (#{argcount} < #{min})") if
- argcount < min
end
def parser
@@parser ||= DeloreanParser.new
end