You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expected output should be in .json files, so they can easily be edited
the AST should be transformed into a JSON format: the tests should work by comparing the expected and actual results in this format
the JSON format should not be the same as the AST format; the AST format has design decisions that may change; instead it should be a neutral tuple-based format e.g. an addition can be represented by ["+", L, R].
positions should not be in the JSON format: it is not practical to verify that they are correct by hand; alternative ways should be found to check position information
first of all check that the tokenizer is giving the right positions (since tokens are literal strings, this should be easy)
then check that the position of each node in the AST corresponds to a token of the right type (i.e. an addition should correspond to a "+" token)
The parsing tests should be designed in a way that when the AST data structure is changed, it is only a little work to get the tests working.
The text was updated successfully, but these errors were encountered: