use of org.wso2.ballerinalang.compiler.semantics.model.SymbolTable in project ballerina by ballerina-lang.
the class ParserUtils method loadBuiltInPackage.
/**
* Loading builtin packages.
*
* @param context compiler context
* @return {BLangPackage} builtIn package
*/
private static BLangPackage loadBuiltInPackage(CompilerContext context) {
PackageLoader pkgLoader = PackageLoader.getInstance(context);
SymbolTable symbolTable = SymbolTable.getInstance(context);
SemanticAnalyzer semAnalyzer = SemanticAnalyzer.getInstance(context);
CodeAnalyzer codeAnalyzer = CodeAnalyzer.getInstance(context);
Desugar desugar = Desugar.getInstance(context);
BLangPackage builtInPkg = desugar.perform(codeAnalyzer.analyze(semAnalyzer.analyze(pkgLoader.loadAndDefinePackage(Names.BUILTIN_ORG.getValue(), Names.BUILTIN_PACKAGE.getValue()))));
symbolTable.builtInPackageSymbol = builtInPkg.symbol;
return builtInPkg;
}
Aggregations