kopek-org / niagara-lang

Compiler for the Niagara language
GNU Affero General Public License v3.0
3 stars 6 forks source link

Adding locs to AST #6

Closed Ninjapouet closed 1 year ago

Ninjapouet commented 1 year ago

This PR adds locs to some identified AST nodes. Thoses nodes were tracked back from errors messages so it may be incomplete. However, it seems to be a good base to give more useful informations to user.

Locations are now abstracted over legacy Pos module. This allows to implements locs in a more efficient way if needed (for now, the implementation is quite straightforward).

Keryan-dev commented 1 year ago

That looks good, thanks !

I see the parser automata has changed, I wonder if this has introduced some new errors states that the user shouldn't know about (and the developer shouldn't bother maintaining).

Ninjapouet commented 1 year ago

Seems that automata changes were introduced by actor_desc indirection which is probably without consequences as the grammar don't change actually.