Skip to content

How to handle (ignore) comments? #1

@Marcus9K720

Description

@Marcus9K720

I have to parse a lua file which only has a table, but it has comments here and there.
luadata parses everything great but it seems doesnt handle comments...

src = """t = {
	['a'] = 1000, -- hello
	['b'] = {
	},
	['c'] = 'stable',
}"""
print(luadata.unserialize(src))

{'t': {'a': 1000, 1: '--', 2: 'hello', 'b': [''], 'c': 'stable'}}

Maybe I am missing something but I need your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions