jmeaster30 / ocean

A C-like programming language (get it like sea-like like an ocean lol)
GNU General Public License v3.0
0 stars 0 forks source link

We need functions to get the start location and end location of a specific ast node #13

Closed jmeaster30 closed 2 years ago

jmeaster30 commented 2 years ago

need to add getStart and getEnd functions to the astNode that returns pairs where the first part is the linenum and the second part is the colnum.

We should be able to give it the whole program and get the index of the first thing in the file and the last thing in the file (like skip whitespaces at the beginning and end)

We should be able to get any subtree and get the proper start and end

This may need to add some stuff to the parser

jmeaster30 commented 2 years ago

Done