Skip to content

Commit

Permalink
Merge pull request #138 from savq/scanner-fix
Browse files Browse the repository at this point in the history
Fix scanner lookahead error and update CI
  • Loading branch information
savq authored Apr 13, 2024
2 parents feb151e + 2eae9e2 commit c0acda0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
name: Build/test
name: CI

on:
push:
branches:
- "**"
- master
- main
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
pull_request:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ uninstall:
clean:
$(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT)

test:
test: $(SRC_DIR)/parser.c
$(TS) test
./script/parse-examples

.PHONY: all install uninstall clean test
1 change: 0 additions & 1 deletion script/known-failures.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
examples/Flux.jl/test/optimise.jl
examples/Flux.jl/test/utils.jl
examples/Flux.jl/src/train.jl
examples/Gadfly.jl/test/testscripts/unitful_basic.jl
Expand Down
2 changes: 1 addition & 1 deletion src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static bool scan_string_content(TSLexer *lexer, Stack *stack, bool interp) {
TSSymbol end_symbol = (end_char == '"') ? STRING_END : COMMAND_END;
TSSymbol content_symbol = interp ? STRING_CONTENT : STRING_CONTENT_NO_INTERP;
bool has_content = false;
char next;
int32_t next;
while ((next = lexer->lookahead)) {
mark_end(lexer);
if (next == '\\') {
Expand Down

0 comments on commit c0acda0

Please sign in to comment.