Here are the examples of the python api pico8.lua.parser.Parser taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
Example 1
Project: picotool Source File: parser_test.py
def testProcessTokens(self):
tokens = get_tokens(LUA_SAMPLE)
p = parser.Parser(version=4)
p.process_tokens(tokens)
self.assertIsNotNone(p.root)
self.assertEqual(14, len(p.root.stats))
0
Example 2
def get_parser(s):
p = parser.Parser(version=4)
p._tokens = get_tokens(s)
p._pos = 0
return p