Commit 2b647ab
authored
Fix inline io parsing with mixins (#1756)
When there was no space between the `:=` and `with` tokens when
parsing an inline io statement, for example:
```
operation Foo {
input :=with [Bar] {}
}
```
the parser would skip the `with` and so not realize its parsing a
mixin, failing when it sees a `[` instead of a `{`. This was due
to an extra call to `tokenizer.next()`, which skipped the `with`.
Usually the `next()` would just skip the space before the `with`,
but when the space wasn't present it skipped the `with`.
The inline-io test was updated to include this case.1 parent 11fee39 commit 2b647ab
File tree
2 files changed
+2
-2
lines changed- smithy-model/src
- main/java/software/amazon/smithy/model/loader
- test/resources/software/amazon/smithy/model/loader/valid/inline-io
2 files changed
+2
-2
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
1086 | | - | |
1087 | 1086 | | |
1088 | 1087 | | |
1089 | 1088 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
0 commit comments