mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-02 21:00:56 +00:00
implement support for multiple index operations
This commit is contained in:
parent
b451f74239
commit
48e19a8068
4
examples/index.pork
Normal file
4
examples/index.pork
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export func main() {
|
||||||
|
let items = [["Hello"], ["Goodbye"]]
|
||||||
|
println(items[0][0])
|
||||||
|
}
|
@ -63,7 +63,7 @@ class Parser(source: TokenSource, attribution: NodeAttribution) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (peek(TokenType.LeftBracket)) {
|
while (peek(TokenType.LeftBracket)) {
|
||||||
expression = produce(NodeType.IndexedBy) {
|
expression = produce(NodeType.IndexedBy) {
|
||||||
attribution.adopt(expression)
|
attribution.adopt(expression)
|
||||||
expect(TokenType.LeftBracket)
|
expect(TokenType.LeftBracket)
|
||||||
|
Loading…
Reference in New Issue
Block a user