Merge pull request #476 from v1nh1shungry/fix-error-value

This commit is contained in:
Auguste Rame 2022-04-20 07:25:24 -04:00 committed by GitHub
commit 256d7b7cdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -448,9 +448,18 @@ pub fn lastToken(tree: Ast, node: Ast.Node.Index) Ast.TokenIndex {
.asm_simple,
.asm_output,
.asm_input,
.error_value,
=> return datas[n].rhs + end_offset,
.error_value => {
if (datas[n].rhs != 0) {
return datas[n].rhs + end_offset;
} else if (datas[n].lhs != 0) {
return datas[n].lhs + end_offset;
} else {
return main_tokens[n] + end_offset;
}
},
.anyframe_literal,
.char_literal,
.integer_literal,