diff --git a/src/main/java/com/github/vitalibo/intellij/bitbake/BitBake.bnf b/src/main/java/com/github/vitalibo/intellij/bitbake/BitBake.bnf index ea3b326..7a4fc91 100644 --- a/src/main/java/com/github/vitalibo/intellij/bitbake/BitBake.bnf +++ b/src/main/java/com/github/vitalibo/intellij/bitbake/BitBake.bnf @@ -20,8 +20,8 @@ bitbakeFile ::= item_* private item_ ::= (variable|bbFunction|bbStatement|keyword|COMMENT|CRLF) variable ::= (EXPORT? KEY OVERRIDE* OPERATOR VALUE) bbFunction ::= (bbBashFunction | bbPyFunction | bbDefPyFunction) -bbBashFunction ::= (BB_FUNCTION_NAME OVERRIDE* LB RB LBB FB+ RBB) -bbPyFunction ::= (PYTHON (BB_FUNCTION_NAME OVERRIDE*)? LB RB LBB FB+ RBB) +bbBashFunction ::= (FAKEROOT? BB_FUNCTION_NAME OVERRIDE* LB RB LBB FB+ RBB) +bbPyFunction ::= (FAKEROOT? PYTHON (BB_FUNCTION_NAME OVERRIDE*)? LB RB LBB FB+ RBB) bbDefPyFunction ::= (DEF BB_FUNCTION_NAME LB bbDefParam* RB LBB FB+ RBB) bbDefParam ::= (BB_FUNCTION_NAME COMMA?)+ keyword ::= (INHERIT|INCLUDE|REQUIRE|EXPORT) INCLUDE_REST diff --git a/src/main/java/com/github/vitalibo/intellij/bitbake/BitBake.flex b/src/main/java/com/github/vitalibo/intellij/bitbake/BitBake.flex index 04eeeea..1f4677c 100644 --- a/src/main/java/com/github/vitalibo/intellij/bitbake/BitBake.flex +++ b/src/main/java/com/github/vitalibo/intellij/bitbake/BitBake.flex @@ -47,6 +47,7 @@ FN_TOKEN=({FN_NAME} {BROKEN_OVERRIDE}*) { "python" { return BitBakeTypes.PYTHON; } + "fakeroot" { return BitBakeTypes.FAKEROOT; } "(" { return BitBakeTypes.LB; } ")" { return BitBakeTypes.RB; } "{" { yybegin(FUNCTION_VALUE); return BitBakeTypes.LBB; } diff --git a/src/main/java/com/github/vitalibo/intellij/bitbake/BitBakeSyntaxHighlighter.java b/src/main/java/com/github/vitalibo/intellij/bitbake/BitBakeSyntaxHighlighter.java index f14b450..b3698d5 100644 --- a/src/main/java/com/github/vitalibo/intellij/bitbake/BitBakeSyntaxHighlighter.java +++ b/src/main/java/com/github/vitalibo/intellij/bitbake/BitBakeSyntaxHighlighter.java @@ -62,6 +62,8 @@ public TextAttributesKey[] getTokenHighlights(IElementType tokenType) { return KEYWORD_KEYS; } else if (tokenType.equals(BitBakeTypes.OVERRIDE)) { return KEYWORD_KEYS; + } else if (tokenType.equals(BitBakeTypes.FAKEROOT)) { + return KEYWORD_KEYS; } else if (tokenType.equals(TokenType.BAD_CHARACTER)) { return BAD_CHAR_KEYS; } else {