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 updates on grammar rules and test cases #11

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

WilsonZiweiWang
Copy link
Collaborator

@WilsonZiweiWang WilsonZiweiWang commented Oct 2, 2023

1. Replace hard-coded operators with .* to match all function and variable names regardless of what comes after the : since we don't care about them for now.
2. Make sure the names following a : won't be seen as references to a declared object.
3. Use the injection approach to apply necessary grammar rules for bitbake conf files
4. Implement a minimum set of rules including variables, variable expansion, some keywords etc to reduce conflicts with non-bitbake .conf files

Changes related to what is above have been reverted. This PR is now for grammar rule changes in bitbake.tmLanguage.json and test cases

@WilsonZiweiWang WilsonZiweiWang self-assigned this Oct 2, 2023
@WilsonZiweiWang WilsonZiweiWang force-pushed the Feature-10094-Improve-syntax-parser branch from 1426bf2 to ba8086b Compare October 5, 2023 17:10
@WilsonZiweiWang WilsonZiweiWang changed the title Chore: Modify regex for better match Apply separate grammar rules on .conf files and add tests Oct 5, 2023
@moh60 moh60 requested a review from deribaucourt October 5, 2023 17:56
@WilsonZiweiWang
Copy link
Collaborator Author

WilsonZiweiWang commented Oct 5, 2023

1. Changes to grammar rule:
Highlight a single word after inherit/import/from as class
2. Update tests for this change

Changes related to it have been reverted.

@WilsonZiweiWang
Copy link
Collaborator Author

Add more Python keywords for highlighting;
Update tests for this change

client/syntaxes/bitbake.tmLanguage.json Outdated Show resolved Hide resolved
client/syntaxes/bitbake.tmLanguage.json Outdated Show resolved Hide resolved
@WilsonZiweiWang WilsonZiweiWang force-pushed the Feature-10094-Improve-syntax-parser branch from 993c5a3 to cdaf147 Compare October 6, 2023 00:21
Copy link
Member

@deribaucourt deribaucourt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions

package-lock.json Outdated Show resolved Hide resolved
client/package.json Outdated Show resolved Hide resolved
client/package.json Outdated Show resolved Hide resolved
client/syntaxes/bitbake-conf.injection.json Outdated Show resolved Hide resolved
client/syntaxes/bitbake-conf.injection.json Outdated Show resolved Hide resolved
@WilsonZiweiWang WilsonZiweiWang changed the title Apply separate grammar rules on .conf files and add tests Various updates on grammar rules and test cases Oct 6, 2023
@WilsonZiweiWang WilsonZiweiWang force-pushed the Feature-10094-Improve-syntax-parser branch from cdaf147 to 75438c2 Compare October 11, 2023 20:15
@WilsonZiweiWang
Copy link
Collaborator Author

Repushed the changes on package-lock.json after npm i

Copy link
Member

@deribaucourt deribaucourt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the git history look better by squashing some of the revert/updates you made?

client/test/grammars/test-cases/keywords.bb Outdated Show resolved Hide resolved
client/test/grammars/snaps/keywords.bb Outdated Show resolved Hide resolved
@WilsonZiweiWang
Copy link
Collaborator Author

WilsonZiweiWang commented Oct 12, 2023

Would the git history look better by squashing some of the revert/updates you made?

We have the option to squash all the commits when this PR is merged. But I reset the commits, it should look better now.

@WilsonZiweiWang WilsonZiweiWang force-pushed the Feature-10094-Improve-syntax-parser branch from b0a8115 to 50311f0 Compare October 12, 2023 19:43
@WilsonZiweiWang WilsonZiweiWang merged commit da94c14 into staging Oct 16, 2023
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

Successfully merging this pull request may close these issues.

3 participants