Compiler/Verifying syntax: Difference between revisions
m
→{{header|Go}}: Minor adjustments to remove some superfluous white-space.
(Added Go) |
m (→{{header|Go}}: Minor adjustments to remove some superfluous white-space.) |
||
Line 67:
e = strings.ReplaceAll(e, strings.TrimSpace(sub[1]), strings.TrimSpace(sub[0]))
}
return strings.Split(e, ":")[2][1:] // remove location info as may be inaccurate
}
Line 90:
_, err := parser.ParseExpr(expr)
if err != nil {
fmt.Println(`"false" ->
} else {
fmt.Println(`"true"`)
Line 104:
Statement to verify: " and 3 < 2"
"false" ->
Statement to verify: "not 7 < 2"
Line 113:
Statement to verify: "235 76 + 1"
"false" ->
Statement to verify: "a + b = not c and false"
Line 119:
Statement to verify: "ab_c / bd2 or < e_f7"
"false" ->
Statement to verify: "g not = h"
|