Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems like 'false' is an invalid token #3

Closed
gamedevsam opened this issue Apr 8, 2013 · 3 comments
Closed

Seems like 'false' is an invalid token #3

gamedevsam opened this issue Apr 8, 2013 · 3 comments

Comments

@gamedevsam
Copy link
Contributor

I got this error when I tried to assign a bool to false:

Line 2 Character 1: Invalid Token 'false' at haxetoml::TomlParser/InvalidToken()[\source\lib\toml\src\haxetoml\TomlParser.hx:337]

@gamedevsam
Copy link
Contributor Author

Found the problem, it was a an issue with the regular expression for boolean:

was:
{ type: TokenType.TkBoolean, ereg: ~/^true|false/},
fixed:
{ type: TokenType.TkBoolean, ereg: ~/^true|^false/},

it was missing the ^ before the false

@yhslai
Copy link
Owner

yhslai commented Apr 10, 2013

It's not the reason, the real problem is my matching order is wrong so that it deems 'false' as a key(not boolean).
But sadly and reluctantly, the regexp is wrong too. Thanks for pointing out these two bugs.

I think I fixed it in v0.1.3. If you have time please try out.

(seems I should prepare some comprehensive test files and unit tests... but I truly have no time recently)

@gamedevsam
Copy link
Contributor Author

works. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants