pico8.lua.parser.Parser

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 7

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))

Example 2

Project: picotool Source File: parser_test.py
Function: get_parser
def get_parser(s):
    p = parser.Parser(version=4)
    p._tokens = get_tokens(s)
    p._pos = 0
    return p