Fix inclusion of libc++ in wasm build
This commit is contained in:
parent
73e1512555
commit
f3ecafe13b
3 changed files with 14 additions and 4 deletions
|
|
@ -1,11 +1,11 @@
|
|||
const {assert} = require('chai');
|
||||
let Parser, JavaScript;
|
||||
let Parser, JavaScript, Python;
|
||||
|
||||
describe("Parser", () => {
|
||||
let parser;
|
||||
|
||||
before(async () =>
|
||||
({Parser, JavaScript} = await require('./helper'))
|
||||
({Parser, JavaScript, Python} = await require('./helper'))
|
||||
);
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
@ -125,6 +125,15 @@ describe("Parser", () => {
|
|||
assert.equal(tree.rootNode.firstChild.firstChild.namedChildCount, repeatCount);
|
||||
});
|
||||
|
||||
it.only("can use languages with external scanners written in C++", () => {
|
||||
parser.setLanguage(Python);
|
||||
tree = parser.parse("def foo():\n bar()");
|
||||
assert.equal(
|
||||
tree.rootNode.toString(),
|
||||
'(module (function_definition (identifier) (parameters) (expression_statement (call (identifier) (argument_list)))))'
|
||||
);
|
||||
});
|
||||
|
||||
it('parses only the text within the `includedRanges` if they are specified', () => {
|
||||
const sourceCode = "<% foo() %> <% bar %>";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue