Eliminate @builtin decorator for compatibility with TS

This commit is contained in:
dcodeIO
2018-03-21 16:29:08 +01:00
parent 56d891583e
commit 49f4d3dff1
22 changed files with 949 additions and 984 deletions

View File

@ -7,7 +7,8 @@ import {
CommonFlags,
PATH_DELIMITER,
STATIC_DELIMITER,
INSTANCE_DELIMITER
INSTANCE_DELIMITER,
LIBRARY_PREFIX
} from "./program";
import {
@ -703,12 +704,15 @@ export abstract class Node {
stmt.namespaceName = null;
stmt.path = path;
var normalizedPath = normalizePath(path.value);
if (path.value.startsWith(".")) { // relative
if (path.value.startsWith(".")) { // relative in project
stmt.normalizedPath = resolvePath(
normalizedPath,
range.source.normalizedPath
);
} else { // absolute
} else { // absolute in library
if (!normalizedPath.startsWith(LIBRARY_PREFIX)) {
normalizedPath = LIBRARY_PREFIX + normalizedPath;
}
stmt.normalizedPath = normalizedPath;
}
stmt.internalPath = mangleInternalPath(stmt.normalizedPath);