mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
tests(gleam): fix assert tests that no longer parse correctly
This commit is contained in:
parent
a83f2d1417
commit
75ee7ff2f0
5 changed files with 11 additions and 10 deletions
|
|
@ -4,6 +4,8 @@ local M = {}
|
||||||
|
|
||||||
M.comment_parsers = {
|
M.comment_parsers = {
|
||||||
comment = true,
|
comment = true,
|
||||||
|
luadoc = true,
|
||||||
|
javadoc = true,
|
||||||
jsdoc = true,
|
jsdoc = true,
|
||||||
phpdoc = true,
|
phpdoc = true,
|
||||||
}
|
}
|
||||||
|
|
@ -121,7 +123,6 @@ function M.get_indent(lnum)
|
||||||
return -1
|
return -1
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Reparse in case we got triggered by ":h indentkeys"
|
|
||||||
parser:parse({ vim.fn.line('w0') - 1, vim.fn.line('w$') })
|
parser:parse({ vim.fn.line('w0') - 1, vim.fn.line('w$') })
|
||||||
|
|
||||||
-- Get language tree with smallest range around node that's not a comment parser
|
-- Get language tree with smallest range around node that's not a comment parser
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
assert Ok(i) =
|
assert Ok(i) ==
|
||||||
parse_int("123")
|
parse_int("123")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ describe('indent Java:', function()
|
||||||
run:new_line(
|
run:new_line(
|
||||||
'issue_2583.java',
|
'issue_2583.java',
|
||||||
{ on_line = 3, text = 'int x = 1;', indent = 4 },
|
{ on_line = 3, text = 'int x = 1;', indent = 4 },
|
||||||
'fails because tree is in a broken state',
|
'broken tree',
|
||||||
XFAIL
|
XFAIL
|
||||||
)
|
)
|
||||||
run:new_line('issue_2583.java', { on_line = 4, text = 'int x = 1;', indent = 4 })
|
run:new_line('issue_2583.java', { on_line = 4, text = 'int x = 1;', indent = 4 })
|
||||||
|
|
|
||||||
|
|
@ -56,13 +56,13 @@ describe('indent Python:', function()
|
||||||
run:new_line(
|
run:new_line(
|
||||||
'join_lines.py',
|
'join_lines.py',
|
||||||
{ on_line = 1, text = '+ 1 \\', indent = 4 },
|
{ on_line = 1, text = '+ 1 \\', indent = 4 },
|
||||||
'fails due two not working query at python/indent.scm:30',
|
'expected failure',
|
||||||
XFAIL
|
XFAIL
|
||||||
)
|
)
|
||||||
run:new_line(
|
run:new_line(
|
||||||
'join_lines.py',
|
'join_lines.py',
|
||||||
{ on_line = 4, text = '+ 1 \\', indent = 4 },
|
{ on_line = 4, text = '+ 1 \\', indent = 4 },
|
||||||
'fails due two not working query at python/indent.scm:30',
|
'expected failure',
|
||||||
XFAIL
|
XFAIL
|
||||||
)
|
)
|
||||||
run:new_line('join_lines.py', { on_line = 7, text = '+ 1 \\', indent = 4 })
|
run:new_line('join_lines.py', { on_line = 7, text = '+ 1 \\', indent = 4 })
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
assert Ok(i) = parse_int("123")
|
assert Ok(i) == parse_int("123")
|
||||||
// <- @keyword.exception
|
// <- @keyword.exception
|
||||||
// ^^ @constructor
|
// ^^ @constructor
|
||||||
// ^ @punctuation.bracket
|
// ^ @punctuation.bracket
|
||||||
// ^ @variable
|
// ^ @variable
|
||||||
// ^ @punctuation.bracket
|
// ^ @punctuation.bracket
|
||||||
// ^ @operator
|
// ^ @operator
|
||||||
// ^^^^^^^^^ @function.call
|
// ^^^^^^^^^ @function.call
|
||||||
// ^ @punctuation.bracket
|
// ^ @punctuation.bracket
|
||||||
// ^^^^^ @string
|
// ^^^^^ @string
|
||||||
// ^ @punctuation.bracket
|
// ^ @punctuation.bracket
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue