Commit 80d738c
authored
Add support for overlay/fragments in DevicetreeLexer and update example DTS file (#3021)
The DTS lexer had issues with recognizing overlay/fragment syntax, whereby in
the following snippet:
&i2c1 {
serlcd@72 {
compatible = "sparkfun,serlcd";
reg = <0x72>;
columns = <16>;
rows = <2>;
command-delay-ms = <10>;
special-command-delay-ms = <50>;
};
};
the "i2c1" was being tokenized as a Name.Attribute instead of a Name.Function,
causing the rest of the lexing to fail as it encountered the "@" character.
This fixes the issue by adding proper support for overlay/fragment syntax.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>1 parent bdd74eb commit 80d738c
3 files changed
Lines changed: 139 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
91 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
90 | 105 | | |
91 | 106 | | |
92 | 107 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments