mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 17:31:29 +00:00
Reintroduce builtin decorator so these can appear anywhere in stdlib again
Avoids wrapping an undocumented function within 'memory.size' for example.
This commit is contained in:
@ -86,8 +86,6 @@ import {
|
||||
nodeIsGenericCallable
|
||||
} from "./ast";
|
||||
|
||||
const builtinsFile = LIBRARY_PREFIX + "builtins.ts";
|
||||
|
||||
/** Parser interface. */
|
||||
export class Parser extends DiagnosticEmitter {
|
||||
|
||||
@ -135,11 +133,6 @@ export class Parser extends DiagnosticEmitter {
|
||||
var program = this.program;
|
||||
program.sources.push(source);
|
||||
|
||||
// mark the special builtins library file
|
||||
if (source.normalizedPath == builtinsFile) {
|
||||
source.set(CommonFlags.BUILTIN);
|
||||
}
|
||||
|
||||
// tokenize and parse
|
||||
var tn = new Tokenizer(source, program.diagnostics);
|
||||
tn.onComment = this.onComment;
|
||||
@ -176,9 +169,6 @@ export class Parser extends DiagnosticEmitter {
|
||||
decorators.push(decorator);
|
||||
}
|
||||
|
||||
// mark builtins
|
||||
flags |= (tn.source.flags & CommonFlags.BUILTIN);
|
||||
|
||||
// check modifiers
|
||||
var exportStart: i32 = 0;
|
||||
var exportEnd: i32 = 0;
|
||||
|
Reference in New Issue
Block a user