Sha256: be9ff7c5ccab92e1faf3199cb6b91b2e51e6229dbd26f3d52f95af41c7adf5f1
Contents?: true
Size: 493 Bytes
Versions: 1
Compression:
Stored size: 493 Bytes
Contents
# frozen_string_literal: true require "lua_parser" class FuncVisitor < LuaParser::Visitor def visit_functioncall(ctx) puts ctx.var_or_exp.text visit_children(ctx) end end Dir.glob('lua/**/*.lua').each do |file_name| # this file contains some weird non-UTF8 strings, so let's just skip it next if File.basename(file_name) == "strings.lua" lua_code = File.read(file_name) parser = LuaParser::Parser.parse(lua_code) visitor = FuncVisitor.new parser.visit(visitor) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
antlr4-native-2.2.1 | spec/lua-parser-rb/parse_test.rb |