Add support for comma-separated imports
This commit is contained in:
parent
7497994100
commit
b872410b95
@ -1551,6 +1551,7 @@ static size_t importModule(KrkToken * startOfName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void importStatement() {
|
static void importStatement() {
|
||||||
|
do {
|
||||||
KrkToken firstName = parser.current;
|
KrkToken firstName = parser.current;
|
||||||
KrkToken startOfName;
|
KrkToken startOfName;
|
||||||
size_t ind = importModule(&startOfName);
|
size_t ind = importModule(&startOfName);
|
||||||
@ -1572,6 +1573,7 @@ static void importStatement() {
|
|||||||
}
|
}
|
||||||
declareVariable();
|
declareVariable();
|
||||||
defineVariable(ind);
|
defineVariable(ind);
|
||||||
|
} while (match(TOKEN_COMMA));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fromImportStatement() {
|
static void fromImportStatement() {
|
||||||
|
Loading…
Reference in New Issue
Block a user