class Ascode::Parser::Function

Constants

CODE

Public Instance Methods

ast(type, name) click to toggle source
# File lib/ascode/parser/function.rb, line 15
def ast(type, name)
  {
    type: type,
    action: name
  }
end
parse(char) click to toggle source
# File lib/ascode/parser/function.rb, line 4
def parse(char)
  CODE.find do |type|
    type[1].find do |function|
      @ast = ast type[0], function[1] if function[0] == char
    end
  end

  return unless @ast
  @ast
end