diff --git a/client/syntaxes/bitbake.tmLanguage.json b/client/syntaxes/bitbake.tmLanguage.json index 30031dc6..2c9e2094 100644 --- a/client/syntaxes/bitbake.tmLanguage.json +++ b/client/syntaxes/bitbake.tmLanguage.json @@ -61,7 +61,7 @@ "include": "#python-keywords" }, { - "match": "\\b(python|def)\\b(\\(?)", + "match": "(?<=^|^fakeroot +)\\b(python|def)\\b", "captures": { "1": { "name": "storage.type.function.python.bb" diff --git a/client/test/grammars/test-cases/functions.bb b/client/test/grammars/test-cases/functions.bb index 96b5842a..67022a32 100644 --- a/client/test/grammars/test-cases/functions.bb +++ b/client/test/grammars/test-cases/functions.bb @@ -25,8 +25,8 @@ > else: > return "dependency" ->python () { -#^^^^^^ source.bb storage.type.function.python.bb - entity.name.function.python.bb +python () { +#<------ source.bb storage.type.function.python.bb - entity.name.function.python.bb > if d.getVar('SOMEVAR') == 'value': # ^^^^^^ source.bb entity.name.function.python.bb > d.setVar('ANOTHERVAR', 'value2') diff --git a/client/test/grammars/test-cases/keywords.bb b/client/test/grammars/test-cases/keywords.bb index 106fd0b5..0843e023 100644 --- a/client/test/grammars/test-cases/keywords.bb +++ b/client/test/grammars/test-cases/keywords.bb @@ -30,15 +30,15 @@ >INHERIT += "autotools pkgconfig" #^^^^^^^ source.bb keyword.control.bb ->fakeroot python foo3() {} -#^^^^^^^^ source.bb keyword.control.bb -# ^^^^^^ source.bb storage.type.function.python.bb +fakeroot python foo3() {} +#<-------- source.bb keyword.control.bb +# ^^^^^^ source.bb storage.type.function.python.bb ->python (){} -#^^^^^^ source.bb storage.type.function.python.bb +python (){} +#<------ source.bb storage.type.function.python.bb >inherit_defer foo2 #^^^^^^^^^^^^^ source.bb keyword.control.bb ->python(){} -#^^^^^^ source.bb storage.type.function.python.bb \ No newline at end of file +python(){} +#<------ source.bb storage.type.function.python.bb \ No newline at end of file