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

Bash functions after EXPORT_FUNCTIONS and addtask statements, bitbake flags in combination with overrides #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fbezdeka
Copy link
Collaborator

I think the commit messages explain everything in detail.

2 fixes:

  • Allow bitbake flags in combination with overrides
  • Fix the highlighting of bash functions after EXPORT_FUNCTIONS and addtask statements

@fbezdeka
Copy link
Collaborator Author

@moqmar maybe you can have a look?

@fbezdeka
Copy link
Collaborator Author

We might have a minor issue now when an addtask or EXPORT_FUNCTIONS statement appears at the end of a file with no CRLF token at the end....

Investigating...

Previously the parser/highlighter failed in the following two
situations:

First:
        addtask taskname before anothertask
        bashfn() {
          :
        }

Second:
        EXPORT_FUNCTIONS functionname
        bashfn() {
          :
        }

The reason is that both lexer rules (= ADD_TASK_STATEMENT,
EXPORT_FUNC_STATEMENT) end with one BB_FUNCTION_NAME token.

The name of the bash function is also a BB_FUNCTION_NAME token and
therefor valid for the bbAddTaskStatement and bbExportFuncStatement
rules. The parser allowed the function name but failed on the opening
bracket.

Fixed by clearly terminating with CRLF tokens.

Signed-off-by: Florian Bezdeka <[email protected]>
The following could not be parsed / highlighted correctly:
    variable:override[attribute] += "value"
    variable:override:override[attribute] += "value"

Signed-off-by: Florian Bezdeka <[email protected]>
@fbezdeka
Copy link
Collaborator Author

fbezdeka commented Nov 3, 2024

We might have a minor issue now when an addtask or EXPORT_FUNCTIONS statement appears at the end of a file with no CRLF token at the end....

Investigating...

That is fixed now... Waiting for review...

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.

1 participant