Compare commits
14 commits
2326d709fb
...
6b2ecc78ac
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 6b2ecc78ac | ||
Bruno BELANYI | 626ffea712 | ||
Bruno BELANYI | 6918efba46 | ||
Bruno BELANYI | d5654de519 | ||
Bruno BELANYI | f267a5be95 | ||
Bruno BELANYI | 96ae542119 | ||
Bruno BELANYI | 8166742493 | ||
Bruno BELANYI | 7d8f958a90 | ||
Bruno BELANYI | 3bc77aab19 | ||
Bruno BELANYI | 734f4452dd | ||
Bruno BELANYI | c56e2eca70 | ||
Bruno BELANYI | b2e113a821 | ||
Bruno BELANYI | 93a71d095b | ||
Bruno BELANYI | bc4db561ca |
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tree-sitter-bp"
|
name = "tree-sitter-bp"
|
||||||
description = "Blueprint grammar for the tree-sitter parsing library"
|
description = "Blueprint grammar for the tree-sitter parsing library"
|
||||||
version = "0.4.0"
|
version = "0.3.0"
|
||||||
keywords = ["incremental", "parsing", "android", "blueprint"]
|
keywords = ["incremental", "parsing", "android", "blueprint"]
|
||||||
categories = ["parsing", "text-editors"]
|
categories = ["parsing", "text-editors"]
|
||||||
repository = "https://git.belanyi.fr/ambroisie/tree-sitter-bp"
|
repository = "https://git.belanyi.fr/ambroisie/tree-sitter-bp"
|
||||||
|
|
|
@ -61,10 +61,6 @@
|
||||||
export NVIM_TREESITTER_TEXTOBJECTS='${pkgs.vimPlugins.nvim-treesitter-textobjects}'
|
export NVIM_TREESITTER_TEXTOBJECTS='${pkgs.vimPlugins.nvim-treesitter-textobjects}'
|
||||||
export NVIM_TREESITTER_PARSER='${pkgs.vimPlugins.nvim-treesitter.grammarToPlugin self.packages.${system}.tree-sitter-bp}'
|
export NVIM_TREESITTER_PARSER='${pkgs.vimPlugins.nvim-treesitter.grammarToPlugin self.packages.${system}.tree-sitter-bp}'
|
||||||
|
|
||||||
# FIXME: not sure why, but I get different behaviour when left untouched
|
|
||||||
XDG_CONFIG_HOME=$(mktemp -d)
|
|
||||||
export XDG_CONFIG_HOME
|
|
||||||
|
|
||||||
nvim --headless --noplugin -u ${scripts/minimal_init.lua} \
|
nvim --headless --noplugin -u ${scripts/minimal_init.lua} \
|
||||||
-c "PlenaryBustedDirectory test/ { minimal_init = '${./scripts/minimal_init.lua}' }"
|
-c "PlenaryBustedDirectory test/ { minimal_init = '${./scripts/minimal_init.lua}' }"
|
||||||
'';
|
'';
|
||||||
|
@ -78,9 +74,8 @@
|
||||||
${pkgs.jq}/bin/jq ".version = \"''${NEW_VERSION}\"" package.json > package.json.tmp
|
${pkgs.jq}/bin/jq ".version = \"''${NEW_VERSION}\"" package.json > package.json.tmp
|
||||||
mv package.json.tmp package.json
|
mv package.json.tmp package.json
|
||||||
${pkgs.gnused}/bin/sed -i -e "s/version = \"[0-9.]\\+\"/version = \"''${NEW_VERSION}\"/" Cargo.toml
|
${pkgs.gnused}/bin/sed -i -e "s/version = \"[0-9.]\\+\"/version = \"''${NEW_VERSION}\"/" Cargo.toml
|
||||||
${pkgs.gnused}/bin/sed -i -e "s/version = \"[0-9.]\\+\"/version = \"''${NEW_VERSION}\"/" pyproject.toml
|
|
||||||
|
|
||||||
git add Cargo.toml package.json pyproject.toml
|
git add Cargo.toml package.json
|
||||||
echo "Release ''${NEW_VERSION}" | git commit -eF -
|
echo "Release ''${NEW_VERSION}" | git commit -eF -
|
||||||
git tag -a "v''${NEW_VERSION}" -m "Release ''${NEW_VERSION}"
|
git tag -a "v''${NEW_VERSION}" -m "Release ''${NEW_VERSION}"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tree-sitter-bp",
|
"name": "tree-sitter-bp",
|
||||||
"version": "0.4.0",
|
"version": "0.3.0",
|
||||||
"description": "Blueprint grammar for tree-sitter",
|
"description": "Blueprint grammar for tree-sitter",
|
||||||
"main": "bindings/node",
|
"main": "bindings/node",
|
||||||
"types": "bindings/node",
|
"types": "bindings/node",
|
||||||
|
|
|
@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
||||||
[project]
|
[project]
|
||||||
name = "tree-sitter-bp"
|
name = "tree-sitter-bp"
|
||||||
description = "Bp grammar for tree-sitter"
|
description = "Bp grammar for tree-sitter"
|
||||||
version = "0.4.0"
|
version = "0.0.1"
|
||||||
keywords = ["incremental", "parsing", "tree-sitter", "bp"]
|
keywords = ["incremental", "parsing", "tree-sitter", "bp"]
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
|
|
|
@ -11,15 +11,6 @@
|
||||||
(select_expression
|
(select_expression
|
||||||
")" @indent.branch)
|
")" @indent.branch)
|
||||||
|
|
||||||
(select_value) @indent.begin
|
|
||||||
(select_value
|
|
||||||
")" @indent.branch)
|
|
||||||
|
|
||||||
(select_pattern
|
|
||||||
"(" @indent.begin)
|
|
||||||
(select_pattern
|
|
||||||
")" @indent.branch)
|
|
||||||
|
|
||||||
(select_cases) @indent.begin
|
(select_cases) @indent.begin
|
||||||
(select_cases
|
(select_cases
|
||||||
"}" @indent.branch)
|
"}" @indent.branch)
|
||||||
|
|
|
@ -26,35 +26,3 @@ foo = select(
|
||||||
default: 0,
|
default: 0,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
foo = select((
|
|
||||||
arch(),
|
|
||||||
os(),
|
|
||||||
), {
|
|
||||||
(default, default): [],
|
|
||||||
})
|
|
||||||
|
|
||||||
foo = select(
|
|
||||||
(arch(), os()),
|
|
||||||
{
|
|
||||||
(default, default): [],
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// We're really getting into more and more unlikely choices here...
|
|
||||||
foo = select(
|
|
||||||
(
|
|
||||||
arch(),
|
|
||||||
os(),
|
|
||||||
),
|
|
||||||
{
|
|
||||||
(default, default): [],
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
foo = select((arch(), os()), {
|
|
||||||
(
|
|
||||||
default,
|
|
||||||
default,
|
|
||||||
): [],
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package.path = package.path .. ";" .. vim.env.NVIM_TREESITTER .. "/?.lua"
|
package.path = package.path .. ";" .. vim.env.NVIM_TREESITTER .. "/?.lua"
|
||||||
|
|
||||||
local Runner = require("tests.indent.common").Runner
|
local Runner = require("tests.indent.common").Runner
|
||||||
local XFAIL = require("tests.indent.common").XFAIL
|
|
||||||
|
|
||||||
-- FIXME: path to root
|
-- FIXME: path to root
|
||||||
local runner = Runner:new(it, ".", {
|
local runner = Runner:new(it, ".", {
|
||||||
|
@ -20,7 +19,7 @@ describe("indent Blueprint:", function()
|
||||||
})
|
})
|
||||||
runner:whole_file("test/indent/", {
|
runner:whole_file("test/indent/", {
|
||||||
expected_failures = {
|
expected_failures = {
|
||||||
"test/indent/select.bp",
|
-- NOTE: none for now
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
|
@ -48,14 +47,5 @@ describe("indent Blueprint:", function()
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 26, text = 'default: "value"', indent = 8 }, "default case, trailing, alternate formatting")
|
runner:new_line("test/indent/select.bp", { on_line = 26, text = 'default: "value"', indent = 8 }, "default case, trailing, alternate formatting")
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 26, text = '}', indent = 4 }, "select cases closing delimiter, alternate formatting")
|
runner:new_line("test/indent/select.bp", { on_line = 26, text = '}', indent = 4 }, "select cases closing delimiter, alternate formatting")
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 27, text = ')', indent = 0 }, "select expression closing delimiter, alternate formatting")
|
runner:new_line("test/indent/select.bp", { on_line = 27, text = ')', indent = 0 }, "select expression closing delimiter, alternate formatting")
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 30, text = 'device()', indent = 4 }, "multi-valued select condition, begin")
|
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 31, text = 'device()', indent = 4 }, "multi-valued select condition, middle")
|
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 32, text = 'device()', indent = 4 }, "multi-valued select condition, end")
|
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 46, text = 'device()', indent = 8 }, "multi-valued select condition, begin, alternate formatting")
|
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 47, text = 'device()', indent = 8 }, "multi-valued select condition, middle, alternate formatting")
|
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 48, text = 'device()', indent = 8 }, "multi-valued select condition, end, alternate formatting")
|
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 56, text = 'default,', indent = 8 }, "multi-valued select case, begin", XFAIL)
|
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 57, text = 'default,', indent = 8 }, "multi-valued select case, middle", XFAIL)
|
|
||||||
runner:new_line("test/indent/select.bp", { on_line = 58, text = 'default,', indent = 8 }, "multi-valued select case, end", XFAIL)
|
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue