aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/parsing_problem.txt
blob: add4066843184f1d37343a2f78e7e4cba8759e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Parsing problems with expressions and types
-------------------------------------------

If this is a valid type:
    [3]int

then that creates a parsing ambiguity:
    int i = x
    [3]int arr
which could also be parsed as
    int i = x[3]...
--> this can be solved by forbidding newlines
between the array and index subexpressions.

how about this:
    [3]int a
    a =
    [3]int b
(where = is some operator that works on arrays)