use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol in project ballerina by ballerina-lang.
the class CodeGenerator method generateBALX.
public ProgramFile generateBALX(BLangPackage pkgNode) {
programFile = new ProgramFile();
// TODO: Fix this. Added temporally for codegen. Load this from VM side.
genPackage(this.symTable.builtInPackageSymbol);
// Normal Flow.
BPackageSymbol pkgSymbol = pkgNode.symbol;
genPackage(pkgSymbol);
programFile.entryPkgCPIndex = addPackageRefCPEntry(programFile, pkgSymbol.pkgID);
setEntryPoints(programFile, pkgNode);
// Add global variable indexes to the ProgramFile
prepareIndexes(pvIndexes);
// Create Global variable attribute info
addVarCountAttrInfo(programFile, programFile, pvIndexes);
return programFile;
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol in project ballerina by ballerina-lang.
the class CodeGenerator method visit.
public void visit(BLangImportPackage importPkgNode) {
BPackageSymbol pkgSymbol = importPkgNode.symbol;
genPackage(pkgSymbol);
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol in project ballerina by ballerina-lang.
the class Desugar method visit.
@Override
public void visit(BLangImportPackage importPkgNode) {
BPackageSymbol pkgSymbol = importPkgNode.symbol;
SymbolEnv pkgEnv = this.symTable.pkgEnvMap.get(pkgSymbol);
rewrite(pkgEnv.node, pkgEnv);
result = importPkgNode;
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol in project ballerina by ballerina-lang.
the class IterableCodeDesugar method defineFunction.
private void defineFunction(BLangFunction funcNode, BLangPackage targetPkg) {
final BPackageSymbol packageSymbol = targetPkg.symbol;
final SymbolEnv packageEnv = this.symTable.pkgEnvMap.get(packageSymbol);
symbolEnter.defineNode(funcNode, packageEnv);
packageEnv.enclPkg.functions.add(funcNode);
packageEnv.enclPkg.topLevelNodes.add(funcNode);
}
use of org.wso2.ballerinalang.compiler.semantics.model.symbols.BPackageSymbol in project ballerina by ballerina-lang.
the class TreeVisitor method visit.
public void visit(BLangImportPackage importPkgNode) {
BPackageSymbol pkgSymbol = importPkgNode.symbol;
SymbolEnv pkgEnv = symTable.pkgEnvMap.get(pkgSymbol);
acceptNode(pkgEnv.node, pkgEnv);
}
Aggregations