mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-14 23:41:30 +00:00
Add initial map implementation to tests, see #17
This commit is contained in:
@ -1434,6 +1434,8 @@ export class Source extends Node {
|
||||
tokenizer: Tokenizer | null = null;
|
||||
/** Source map index. */
|
||||
debugInfoIndex: i32 = -1;
|
||||
/** Re-exported sources. */
|
||||
exportPaths: Set<string> | null = null;
|
||||
|
||||
/** Constructs a new source node. */
|
||||
constructor(normalizedPath: string, text: string, kind: SourceKind) {
|
||||
|
@ -1958,8 +1958,11 @@ export class Parser extends DiagnosticEmitter {
|
||||
if (tn.skip(Token.STRINGLITERAL)) {
|
||||
path = Node.createStringLiteralExpression(tn.readString(), tn.range());
|
||||
let ret = Node.createExportStatement(null, path, flags, tn.range(startPos, tn.pos));
|
||||
let internalPath = ret.internalPath;
|
||||
if (internalPath !== null && !this.seenlog.has(internalPath)) {
|
||||
let internalPath = assert(ret.internalPath);
|
||||
let source = tn.source;
|
||||
if (!source.exportPaths) source.exportPaths = new Set();
|
||||
source.exportPaths.add(internalPath);
|
||||
if (!this.seenlog.has(internalPath)) {
|
||||
this.backlog.push(internalPath);
|
||||
this.seenlog.add(internalPath);
|
||||
}
|
||||
|
Reference in New Issue
Block a user