Skip to content

Commit b281c25

Browse files
committed
expect_token: fix token value in error messages
There was a mistype, S.token.val -> S.token.value.
1 parent 6388df2 commit b281c25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function qmlweb_parse($TEXT, document_type, exigent_mode) {
136136
if (is(type, val)) {
137137
return next();
138138
}
139-
token_error(S.token, "Unexpected token " + S.token.type + " " + S.token.val + ", expected " + type + " " + val);
139+
token_error(S.token, "Unexpected token " + S.token.type + " " + S.token.value + ", expected " + type + " " + val);
140140
};
141141

142142
var statement_js = statement;

tests/qml/invalid/ParseError.qml.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"error": {
33
"name": "Error",
4-
"message": "Unexpected token name undefined, expected punc : (line: 4, col: 11, pos: 38)\n 1 import QtQuick 2.5\n 2 \n 3 Item {\n>>4 properly int error: 11\n 5 }\n 6 \n\n"
4+
"message": "Unexpected token name int, expected punc : (line: 4, col: 11, pos: 38)\n 1 import QtQuick 2.5\n 2 \n 3 Item {\n>>4 properly int error: 11\n 5 }\n 6 \n\n"
55
}
66
}

0 commit comments

Comments
 (0)