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

Various syntax bugs #26

Closed
Thom1729 opened this issue Dec 2, 2017 · 4 comments
Closed

Various syntax bugs #26

Thom1729 opened this issue Dec 2, 2017 · 4 comments

Comments

@Thom1729
Copy link

Thom1729 commented Dec 2, 2017

/**/ 42; // Comment doesn't end */

42 /* */ /myVar/g; // Division slashes marked as regexps;

42
/myVar/g; // Division slashes marked as regexps;

myVar
[1]; // Property access marked as array literal.

+function foo() {} []; // Property access marked as array literal.

export default {} []; // Property access marked as array literal.

class Foo {
    bar = 42
    ['prop'] // Property access marked as some kind of flow thing.
}
@borela
Copy link
Owner

borela commented Dec 2, 2017

Hi Thomas
I added a branch to the repo https://github.com/borela/naomi/tree/hotfix/fjsx15-bugs with commits that should fix most of these bugs.

The first one where comments doesn't end, there was a problem in the doc block comments;
The next ones were a little harder specially in the class, it was highlighting the property access as a flow indexer.

I added a condition near variables and literals to expect a property access or an operator and prevent regex literals from consuming the operators. Please check the branch to see if there are any regressions and if it actually fixed the issue.

@borela
Copy link
Owner

borela commented Dec 3, 2017

I saw your post on how to deal with expressions, it is a nice solution, I am going to try to implement it into my syntax. Also, what license do you prefer? I'll add your name and license to the repo because of this solution.

@borela
Copy link
Owner

borela commented Jan 5, 2018

Released the version 3 which should fix those issues.

@borela borela closed this as completed Jan 16, 2018
@borela
Copy link
Owner

borela commented Jan 16, 2018

Fixed in the version 3.

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

No branches or pull requests

2 participants