diff options
| author | Chuck Lever <cel@kernel.org> | 2026-07-12 16:34:48 -0400 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-08-10 09:54:35 -0400 |
| commit | e1391920c69464ca31a2c0448310d55f84dac0e3 (patch) | |
| tree | 1e31b912e4f54525b2b3113ef416d3e53e03a986 /tools/perf/scripts/python/flamegraph.py | |
| parent | 883fe9a7ac13340efc8bac9135415e322821c711 (diff) | |
xdrgen: Record the source position of each declared identifier
In preparation for semantic checks that reject a malformed
specification, record where each declared identifier appears in the
source so a diagnostic can point at the name in error.
The transformer keeps each identifier's spelling but discards its
position, retaining only the position of the enclosing definition.
A caret built from that position falls on the definition keyword
rather than on the identifier, because the definition production
begins at the keyword.
Store the identifier's own line and column on every named
construct: constants, enumerated types and their enumerators,
structs, unions, pointers, typedef declarations, and RPC program,
version, and procedure names. The fields live on the AST base node
and are keyword-only, so lark's positional construction of each
node is unaffected; a construct whose position is not recorded
leaves them zero.
Link: https://patch.msgid.link/20260712203451.124902-3-cel@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
