Fixed CRLF behavior for tests, run tests on all platforms in GitHub CI (#106)
* Fixed CRLF issues in tests * Added GH CI to ensure tests pass on all platforms
This commit is contained in:
parent
3243c9ab73
commit
af9646bad9
|
@ -0,0 +1,22 @@
|
||||||
|
name: Build & Test
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 14
|
||||||
|
- run: npm install
|
||||||
|
- run: node_modules/.bin/tree-sitter test
|
|
@ -44,7 +44,9 @@ module.exports = grammar({
|
||||||
|
|
||||||
extras: $ => [
|
extras: $ => [
|
||||||
$.comment,
|
$.comment,
|
||||||
/\\?\s/,
|
/\s/,
|
||||||
|
/\\\r?\n/,
|
||||||
|
/\\( |\t|\v|\f)/
|
||||||
],
|
],
|
||||||
|
|
||||||
supertypes: $ => [
|
supertypes: $ => [
|
||||||
|
@ -465,7 +467,7 @@ module.exports = grammar({
|
||||||
'"'
|
'"'
|
||||||
),
|
),
|
||||||
|
|
||||||
_string_content: $ => token(prec(-1, /([^"`$\\]|\\(.|\n))+/)),
|
_string_content: $ => token(prec(-1, /([^"`$\\]|\\(.|\r?\n))+/)),
|
||||||
|
|
||||||
array: $ => seq(
|
array: $ => seq(
|
||||||
'(',
|
'(',
|
||||||
|
|
|
@ -2041,7 +2041,7 @@
|
||||||
"value": -1,
|
"value": -1,
|
||||||
"content": {
|
"content": {
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
"value": "([^\"`$\\\\]|\\\\(.|\\n))+"
|
"value": "([^\"`$\\\\]|\\\\(.|\\r?\\n))+"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2526,7 +2526,15 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
"value": "\\\\?\\s"
|
"value": "\\s"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "\\\\\\r?\\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "\\\\( |\\t|\\v|\\f)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"conflicts": [],
|
"conflicts": [],
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -220,6 +220,9 @@ struct Scanner {
|
||||||
skip(lexer);
|
skip(lexer);
|
||||||
} else if (lexer->lookahead == '\\') {
|
} else if (lexer->lookahead == '\\') {
|
||||||
skip(lexer);
|
skip(lexer);
|
||||||
|
if (lexer->lookahead == '\r') {
|
||||||
|
skip(lexer);
|
||||||
|
}
|
||||||
if (lexer->lookahead == '\n') {
|
if (lexer->lookahead == '\n') {
|
||||||
skip(lexer);
|
skip(lexer);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -102,8 +102,8 @@ struct TSLanguage {
|
||||||
const uint16_t *small_parse_table;
|
const uint16_t *small_parse_table;
|
||||||
const uint32_t *small_parse_table_map;
|
const uint32_t *small_parse_table_map;
|
||||||
const TSParseActionEntry *parse_actions;
|
const TSParseActionEntry *parse_actions;
|
||||||
const char **symbol_names;
|
const char * const *symbol_names;
|
||||||
const char **field_names;
|
const char * const *field_names;
|
||||||
const TSFieldMapSlice *field_map_slices;
|
const TSFieldMapSlice *field_map_slices;
|
||||||
const TSFieldMapEntry *field_map_entries;
|
const TSFieldMapEntry *field_map_entries;
|
||||||
const TSSymbolMetadata *symbol_metadata;
|
const TSSymbolMetadata *symbol_metadata;
|
||||||
|
|
Loading…
Reference in New Issue