aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish.xcodeproj
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-09-29 11:29:50 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-09-29 11:30:21 -0700
commit27dd37ebb4c660ab122ece69bc187b36e390b25b (patch)
tree9e89fdd3c6e8692bba41f398ca3388673101a831 /fish.xcodeproj
parenta186f04f15773b4595d0e359d1e27a903a68d3f7 (diff)
Fix to indent comments in blocks properly (#1710)
This makes two changes to parse trees: 1. Unmaterialized nodes no longer have an invalid source location For example, with the code `while false;end` there are no tokens associated with the while loop's job_list, and therefore it is unmaterialized. Previously it would have had a SOURCE_OFFSET_INVALID. But now it has a zero source length, but an offset equal to the end of the while loop (i.e. the semicolon), and a zero length. Correspondingly, the has_source function now checks the length instead of the offset. 2. Special (comment and error) nodes have always been "disconnected," meaning they are not the child of any other node. However, they now have their parent offsets set to whatever the top of the node stack was when the node was encountered. This gives us a sense of which node the comment is "in", e.g. if we are constructing a job list then the comment's parent will be the job list. This lets us determine the comment's indent.
Diffstat (limited to 'fish.xcodeproj')
0 files changed, 0 insertions, 0 deletions