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
Today, some of Dyno's AST nodes that subclass NamedDecls (and possibly others) report their location as the name of the node. Thus, in the following code, the location is reported as that of the word myVar:
var myVar =42;
// ^^^^^ location
This is inconsistent with other AST nodes in Dyno (the most significant example is probably modules and records, which report their location as the beginning of the keyword). Moreover, we have a mechanism in Dyno by which locations of other part of the AST node can be communicated: additional location maps, introduced by @dlongnecke-cray in #23548.
Currently, the lack of non-name location reporting causes workarounds in language tooling;
Today, some of Dyno's AST nodes that subclass
NamedDecl
s (and possibly others) report their location as the name of the node. Thus, in the following code, the location is reported as that of the wordmyVar
:This is inconsistent with other AST nodes in Dyno (the most significant example is probably modules and records, which report their location as the beginning of the keyword). Moreover, we have a mechanism in Dyno by which locations of other part of the AST node can be communicated: additional location maps, introduced by @dlongnecke-cray in #23548.
Currently, the lack of non-name location reporting causes workarounds in language tooling;
chapel/tools/chplcheck/src/rules.py
Lines 643 to 646 in 00d7194
is the most significant example, and needed to be expanded in #25207.
It might be necessary to adjust error reporting code to make use of auxiliary location maps to compensate for this change.
The text was updated successfully, but these errors were encountered: