We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 717d219 commit ad68bc9Copy full SHA for ad68bc9
packages/scala/nursery.js
@@ -1,4 +1,5 @@
1
const { setup } = require('@ast-grep/nursery')
2
+const assert = require('node:assert')
3
const languageRegistration = require('./index')
4
5
setup({
@@ -7,6 +8,9 @@ setup({
7
8
treeSitterPackage: 'tree-sitter-scala',
9
languageRegistration,
10
testRunner: parse => {
- // add test here
11
+ const sg = parse('val a = 0')
12
+ const root = sg.root()
13
+ const node = root.find('val $A = 0')
14
+ assert.equal(node.kind(), 'val_definition')
15
},
16
})
0 commit comments