Skip to content

Commit

Permalink
Merge pull request #147 from calcit-lang/spread-apis
Browse files Browse the repository at this point in the history
index APIs related to refactor of spreading
  • Loading branch information
NoEgAm authored Feb 27, 2024
2 parents a66fe09 + d3a04ef commit ec5d90c
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 245 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- uses: supplypike/setup-bin@v3
with:
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.8.14/cr'
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.8.34/cr'
name: 'cr'
version: '0.8.14'
version: '0.8.34'

- uses: supplypike/setup-bin@v3
with:
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.8.14/caps'
uri: 'https://github.com/calcit-lang/calcit/releases/download/0.8.34/caps'
name: 'caps'
version: '0.8.14'
version: '0.8.34'

- name: "compiles to js"
run: >
Expand Down
6 changes: 6 additions & 0 deletions docs/apis.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,12 @@
:desc "|detects a string"
:snippets $ []
quote $ string? |demo
{}
:name |is-spreading-mark?
:tags $ #{}
:desc "|detects `&` mark which now a syntax element"
:snippets $ []
quote $ is-spreading-mark? x
{}
:name |tag?
:tags $ #{}
Expand Down
12 changes: 12 additions & 0 deletions docs/internals.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -797,3 +797,15 @@
:desc "|dereference on an atom"
:snippets $ []
quote $ deref *a
{}
:name |&call-spread
:tags $ #{} :syntax
:desc "|call with arguments after `&` spreaded, by default Calcit insert `&call-spread` during preprocessing when `&` is found. it also can be used manually"
:snippets $ []
quote $ &call-spread f & xs
{}
:name |&raw-code
:tags $ #{} :js
:desc "|takes a string, inserts raw js code. it's more flexible than `js/` syntax"
:snippets $ []
quote $ &raw-code "|/^\\d+$/"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dependencies": {
"@calcit/procs": "^0.8.14",
"@calcit/procs": "^0.8.34",
"cirru-color": "^0.2.4",
"copy-text-to-clipboard": "^3.2.0",
"feather-icons": "^4.29.1"
},
"devDependencies": {
"bottom-tip": "^0.1.5",
"vite": "^5.0.11"
"vite": "^5.1.4"
},
"version": "0.0.1"
}
Loading

0 comments on commit ec5d90c

Please sign in to comment.