summaryrefslogtreecommitdiff
path: root/src/stages/compiler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/stages/compiler.rs')
-rw-r--r--src/stages/compiler.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stages/compiler.rs b/src/stages/compiler.rs
index 4777fb4..d4d28dd 100644
--- a/src/stages/compiler.rs
+++ b/src/stages/compiler.rs
@@ -221,10 +221,13 @@ impl SymbolParser {
}
BlockToken::WordTemplate(word_template) => {
for field in &word_template.fields {
+ // If a field is disjoint, the source span of the first range
+ // will identify the whole field.
+ let range = field.ranges.first().unwrap();
self.record_symbol(
&field.name.to_string(),
0,
- &field.source,
+ &range.source,
SymbolRoleDetailed::Invocation,
);
}