Skip to content

Commit

Permalink
fix: properly handle inherit paths
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Nov 8, 2023
1 parent 6cb07d9 commit edcdb7d
Show file tree
Hide file tree
Showing 7 changed files with 9,253 additions and 9,115 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/build
/script
/target
/bindings/rust
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tree-sitter-bitbake

[![Build Status](https://github.com/amaanq/tree-sitter-bitbake/actions/workflows/ci.yml/badge.svg)](https://github.com/amaanq/tree-sitter-bitbake/actions/workflows/ci.yml)
[![CI](https://github.com/amaanq/tree-sitter-bitbake/actions/workflows/ci.yml/badge.svg)](https://github.com/amaanq/tree-sitter-bitbake/actions/workflows/ci.yml)
[![Discord](https://img.shields.io/discord/1063097320771698699?logo=discord)](https://discord.gg/w7nTvsVJhm)

[BitBake](https://docs.yoctoproject.org/bitbake/) grammar for [tree-sitter](https://tree-sitter.github.io)
7 changes: 6 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,13 @@ module.exports = grammar({

inherit_directive: $ => seq(
'inherit',
repeat1(choice($.identifier, $.variable_expansion, $.inline_python)),
repeat1(choice(
$.variable_expansion,
$.inline_python,
$.inherit_path,
)),
),
inherit_path: _ => /[^$ \r\n][^ \r\n]+/,

inherit_configuration_directive: $ => seq(
'INHERIT',
Expand Down
2 changes: 1 addition & 1 deletion queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@

; Namespace

(inherit_directive (identifier) @namespace)
(inherit_path) @namespace

;; Normal parameters
(parameters
Expand Down
10 changes: 7 additions & 3 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit edcdb7d

Please sign in to comment.