Git pull request方法
1.fork
2.修改
3.执行pr
Fixes #.
- 更改文件TinyScript/js/src/lexer/Lexer.js,修复单行测试
if(lookahead == '/') {
while(it.hasNext() && (c = it.next()) != '\n');
continue;
}
- 增加一个测试用例TinyScript/js/src/tests/Lexer.test.js
it("delete one line comment", () => {
const lexer = new Lexer()
const source = "//adnwjdbakd\na=1"
const tokens = lexer.analyse(arrayToGenerator([...source]))
assert.equal(tokens.length, 3)
})