allow multiple source files to be used in parsing

This commit is contained in:
Dave Holoway
2020-06-26 10:32:32 +01:00
parent 175ce1d644
commit 7038bf7090
4 changed files with 97 additions and 59 deletions

View File

@@ -555,6 +555,8 @@ class SourceImport {
}
class SourceUnit {
/** @type {string} */
uri = '';
/** @type {Token[]} */
tokens = [];
/** @type {SourcePackage} */
@@ -614,6 +616,13 @@ class SourceUnit {
method,
};
}
/**
* Return the name of the package this unit belongs to
*/
get packageName() {
return (this.package_ && this.package_.name) || '';
}
}
class SourceArrayType extends ArrayType {