felixhao28 / JSCPP

A simple C++ interpreter written in JavaScript
https://felixhao28.github.io/JSCPP/
MIT License
861 stars 72 forks source link

parse error when run "hello world" program #139

Closed hongliuliao closed 3 years ago

hongliuliao commented 3 years ago
#include <iostream>

int main() {
    std::cout << "hello world" << std::endl;
    return 0;
}

error info:

Error: ERROR: Parsing Failure:
line 4 (column 8): int main() {\n    std::cout << "hello wor
----------------------------------------^
Expected "!=", "%", "%=", "&", "&&", "&=", "(", "*", "*=", "+", "++", "+=", ",", "-", "--", "-=", "->", ".", "/", "/*", "//", "/=", ";", "<", "<<", "<<=", "<=", "=", "==", ">", ">=", ">>", ">>=", "?", "[", "\\U", "\\u", "^", "^=", "__attribute__", "_stdcall", "auto", "const", "extern", "inline", "register", "static", "|", "|=", "||", [ \n\r\t\u000B\u000C], [0-9], [A-Z], [_] or [a-z] but ":" found.
felixhao28 commented 3 years ago

Namespace is still an unimplemented feature.