@@ -87,22 +87,23 @@ export function resolveComponent(
87
87
assert ( ! meta . isStrictMode , 'Strict mode errors should already be handled at compile time' ) ;
88
88
89
89
throw new Error (
90
- `Attempted to resolve a component in a strict mode template, but that value was not in scope: ${
91
- meta . upvars ! [ expr [ 1 ] ] ?? '{unknown variable}'
90
+ `Attempted to resolve a component in a strict mode template, but that value was not in scope: ${ meta . upvars ! [ expr [ 1 ] ] ?? '{unknown variable}'
92
91
} `
93
92
) ;
94
93
}
95
94
96
95
if ( type === SexpOpcodes . GetLexicalSymbol ) {
97
- let { scopeValues, owner } = meta ;
96
+ let { scopeValues, owner, debugSymbols } = meta ;
98
97
let definition = expect ( scopeValues , 'BUG: scopeValues must exist if template symbol is used' ) [
99
98
expr [ 1 ]
100
99
] ;
101
100
102
101
then (
103
102
constants . component (
104
103
definition as object ,
105
- expect ( owner , 'BUG: expected owner when resolving component definition' )
104
+ expect ( owner , 'BUG: expected owner when resolving component definition' ) ,
105
+ false ,
106
+ debugSymbols ?. at ( expr [ 1 ] )
106
107
)
107
108
) ;
108
109
} else {
@@ -182,12 +183,12 @@ export function resolveModifier(
182
183
let type = expr [ 0 ] ;
183
184
184
185
if ( type === SexpOpcodes . GetLexicalSymbol ) {
185
- let { scopeValues } = meta ;
186
+ let { scopeValues, debugSymbols } = meta ;
186
187
let definition = expect ( scopeValues , 'BUG: scopeValues must exist if template symbol is used' ) [
187
188
expr [ 1 ]
188
189
] ;
189
190
190
- then ( constants . modifier ( definition as object ) ) ;
191
+ then ( constants . modifier ( definition as object , debugSymbols ?. at ( expr [ 1 ] ) ?? undefined ) ) ;
191
192
} else if ( type === SexpOpcodes . GetStrictKeyword ) {
192
193
let { upvars } = assertResolverInvariants ( meta ) ;
193
194
let name = unwrap ( upvars [ expr [ 1 ] ] ) ;
@@ -215,7 +216,7 @@ export function resolveModifier(
215
216
) ;
216
217
}
217
218
218
- then ( constants . modifier ( modifier , name ) ) ;
219
+ then ( constants . modifier ( modifier ) ) ;
219
220
}
220
221
}
221
222
@@ -236,15 +237,16 @@ export function resolveComponentOrHelper(
236
237
let type = expr [ 0 ] ;
237
238
238
239
if ( type === SexpOpcodes . GetLexicalSymbol ) {
239
- let { scopeValues, owner } = meta ;
240
+ let { scopeValues, owner, debugSymbols } = meta ;
240
241
let definition = expect ( scopeValues , 'BUG: scopeValues must exist if template symbol is used' ) [
241
242
expr [ 1 ]
242
243
] ;
243
244
244
245
let component = constants . component (
245
246
definition as object ,
246
247
expect ( owner , 'BUG: expected owner when resolving component definition' ) ,
247
- true
248
+ true ,
249
+ debugSymbols ?. at ( expr [ 1 ] )
248
250
) ;
249
251
250
252
if ( component !== null ) {
@@ -316,7 +318,7 @@ export function resolveOptionalComponentOrHelper(
316
318
let type = expr [ 0 ] ;
317
319
318
320
if ( type === SexpOpcodes . GetLexicalSymbol ) {
319
- let { scopeValues, owner } = meta ;
321
+ let { scopeValues, owner, debugSymbols } = meta ;
320
322
let definition = expect ( scopeValues , 'BUG: scopeValues must exist if template symbol is used' ) [
321
323
expr [ 1 ]
322
324
] ;
@@ -333,7 +335,8 @@ export function resolveOptionalComponentOrHelper(
333
335
let component = constants . component (
334
336
definition ,
335
337
expect ( owner , 'BUG: expected owner when resolving component definition' ) ,
336
- true
338
+ true ,
339
+ debugSymbols ?. at ( expr [ 1 ] )
337
340
) ;
338
341
339
342
if ( component !== null ) {
@@ -390,8 +393,7 @@ function lookupBuiltInHelper(
390
393
// Keyword helper did not exist, which means that we're attempting to use a
391
394
// value of some kind that is not in scope
392
395
throw new Error (
393
- `Attempted to resolve a ${ type } in a strict mode template, but that value was not in scope: ${
394
- meta . upvars ! [ expr [ 1 ] ] ?? '{unknown variable}'
396
+ `Attempted to resolve a ${ type } in a strict mode template, but that value was not in scope: ${ meta . upvars ! [ expr [ 1 ] ] ?? '{unknown variable}'
395
397
} `
396
398
) ;
397
399
}
0 commit comments