Allow string as Namespace
This commit is contained in:
parent
983ba1f870
commit
bb46da08de
@ -9831,7 +9831,13 @@ function parse(tokens, file) {
|
||||
const parseDefine = () => {
|
||||
const idx = eatToken("define");
|
||||
let [key] = eatText();
|
||||
let [value] = eatText();
|
||||
let value = void 0;
|
||||
if (currentToken.type == "string") {
|
||||
value = currentToken.value.slice(1, -1);
|
||||
eatToken();
|
||||
} else {
|
||||
[value] = eatText();
|
||||
}
|
||||
eatToken(";");
|
||||
return {
|
||||
type: "define",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/jrpcgen",
|
||||
"version": "1.0.14",
|
||||
"version": "1.0.15",
|
||||
"main": "lib/index.js",
|
||||
"license": "MIT",
|
||||
"packageManager": "yarn@3.1.1",
|
||||
|
@ -426,7 +426,13 @@ export default function parse(tokens: Token[], file: string): Parsed {
|
||||
const idx = eatToken("define");
|
||||
|
||||
let [key] = eatText()
|
||||
let [value] = eatText()
|
||||
let value: string = undefined;
|
||||
if(currentToken.type == "string") {
|
||||
value = currentToken.value.slice(1,-1);
|
||||
eatToken();
|
||||
} else {
|
||||
[value] = eatText()
|
||||
}
|
||||
|
||||
eatToken(";");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user