task_id int64 0 2.26k | repository stringclasses 18
values | commit_hash stringclasses 241
values | filepath stringclasses 237
values | original_method stringlengths 21 4.65k | context listlengths 0 77 | masking dict |
|---|---|---|---|---|---|---|
600 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 44ad3511c4ef847cde9e2c0a7f878c8bbce58002 | src/TreeSitter-FAST-Utils/TSFASTImporter.class.st | visitNode: aTSNode
| fastEntity |
fastEntity := self instantiateFastEntityFrom: aTSNode.
model add: fastEntity.
1 to: aTSNode namedChildCount do: [ :idx |
| childFast fieldName tsNode |
tsNode := aTSNode namedChildAt: idx.
fieldName := aTSNode fieldNameOfChildNamedAt: idx.
childFast := tsNode acce... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-Highlighter/TSHighlighter.class.st",
"code": "Object subclass: #TSHighlighter\n\tinstanceVariableNames: 'attributeMapper parser string'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-Highlighter'"
},
{
"filepath": "repo_clone/Pharo-Tree-S... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "visitNode: aTSNode\n \n \t| fastEntity |\n \tfastEntity := self instantiateFastEntityFrom: aTSNode.\n \tmodel add: fastEntity.\n \t1 to: aTSNode namedChildCount do: [ :idx |\n \t\t| childFast fieldName tsNode |\n \t\ttsNode := aTSN... |
601 | https://github.com/Evref-BL/Pharo-Tree-Sitter | d7cf52bdc9803531597360afca026066dc34a46f | src/TreeSitter-Tests/TSParserPythonTest.class.st | testPositionEndPointInString
| string tree |
string := 'print("Hello, I''m Python!")
# comment'.
tree := TSLibrary uniqueInstance
ts_parser: parser
_parse_string: string
ofLength: string size
usingOldTree: ExternalAddress null.
self
assert: (string positionFromTSPoint:
... | [] | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 9,
"prefix": "testPositionEndPointInString\n\n\t| string tree |\n\tstring := 'print(\"Hello, I''m Python!\")\n# comment'.\n\n\ttree := TSLibrary uniqueInstance\n\t\t ts_parser:",
"suffix": ".\n\tself\n\t\tassert: (string positionFromTSPoint:... |
602 | https://github.com/Evref-BL/Pharo-Tree-Sitter | d7cf52bdc9803531597360afca026066dc34a46f | src/TreeSitter-Tests/TSParserPythonTest.class.st | testPositionEndPointInString
| string tree |
string := 'print("Hello, I''m Python!")
# comment'.
tree := TSLibrary uniqueInstance
ts_parser: parser
_parse_string: string
ofLength: string size
usingOldTree: ExternalAddress null.
self
assert: (string positionFromTSPoint:
... | [] | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "testPositionEndPointInString\n\n\t| string tree |\n\tstring := 'print(\"Hello, I''m Python!\")\n# comment'.\n\n\ttree := TSLibrary uniqueInstance\n\t\t ts_parser: parser\n\t\t _parse_string: string\n\t\t ofLeng... |
603 | https://github.com/Evref-BL/Pharo-Tree-Sitter | beb1f022cfd95cbb27cbff6d0301b5aa29de09a8 | src/TreeSitter-Tests/TSNullPointerExceptionTest.class.st | testMessageText
[
TSNullPointerException signal.
self fail: 'The exception was not signaled'.
] on: TSNullPointerException do: [ :e |
self assert: e messageText isNotEmpty
] | [] | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "testMessageText\n\n\t[\n\t\tTSNullPointerException signal.\n\t\tself fail: 'The exception was not signaled'.\n\t] on: TSNullPointerException do: [ :",
"suffix": "",
"completion": "e |\n\t\tself assert: e messageText isNotEmpty ... |
604 | https://github.com/Evref-BL/Pharo-Tree-Sitter | beb1f022cfd95cbb27cbff6d0301b5aa29de09a8 | src/TreeSitter-Tests/TSNullPointerExceptionTest.class.st | testMessageText
[
TSNullPointerException signal.
self fail: 'The exception was not signaled'.
] on: TSNullPointerException do: [ :e |
self assert: e messageText isNotEmpty
] | [] | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testMessageText\n\n\t[\n\t\tTSNullPointerException signal.\n\t\tself fail: 'The exception was not signaled'.\n\t] on: TSNullPointerException do: [ :e |\n\t\tself",
"suffix": " \n\t]",
"completion": " assert: e messageText isNot... |
605 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 3a81067ac119b18611bebc0ea65709c1336f3839 | src/TreeSitter/TSLibrary.class.st | ts_node_is_null: aTSNode
^ self ffiCall: 'bool ts_node_is_null(TSNode aTSNode)' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-Highlighter/TSHighlighter.class.st",
"code": "Object subclass: #TSHighlighter\n\tinstanceVariableNames: 'attributeMapper parser string'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-Highlighter'"
},
{
"filepath": "repo_clone/Pharo-Tree-S... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_is_null: aTSNode\n\n\t^",
"suffix": "",
"completion": " self ffiCall: 'bool ts_node_is_null(TSNode aTSNode)'"
} |
606 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 3a81067ac119b18611bebc0ea65709c1336f3839 | src/TreeSitter/TSNode.class.st | isNull
^ TSLibrary uniqueInstance ts_node_is_null: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-Highlighter/TSHighlighter.class.st",
"code": "Object subclass: #TSHighlighter\n\tinstanceVariableNames: 'attributeMapper parser string'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-Highlighter'"
},
{
"filepath": "repo_clone/Pharo-Tree-S... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "isNull\n\n\t^ TSLibrary",
"suffix": "",
"completion": " uniqueInstance ts_node_is_null: self"
} |
607 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 29c886a1b78efd20f3d7ac36c226b1279a87c22b | src/TreeSitter-Typescript/TSLanguage.extension.st | typescript
^ TSTypescriptLibrary uniqueInstance tree_sitter_typescript | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-FAST-Utils/TSFASTBuilder.class.st",
"code": "Object subclass: #TSFASTBuilder\n\tinstanceVariableNames: 'tsLanguage languageName'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-FAST-Utils'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/sr... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "typescript\n\n\t^",
"suffix": "",
"completion": " TSTypescriptLibrary uniqueInstance tree_sitter_typescript"
} |
608 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 29c886a1b78efd20f3d7ac36c226b1279a87c22b | src/TreeSitter-Typescript/TSTypescriptLibrary.class.st | tree_sitter_typescript
^ self ffiCall: 'TSLanguage * tree_sitter_typescript ()' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-FAST-Utils/TSFASTBuilder.class.st",
"code": "Object subclass: #TSFASTBuilder\n\tinstanceVariableNames: 'tsLanguage languageName'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-FAST-Utils'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/sr... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "tree_sitter_typescript\n\n\t^",
"suffix": "",
"completion": " self ffiCall: 'TSLanguage * tree_sitter_typescript ()'"
} |
609 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 29c886a1b78efd20f3d7ac36c226b1279a87c22b | src/TreeSitter-Typescript/TSTypescriptLibrary.class.st | unix64LibraryName
^ FFIUnix64LibraryFinder findAnyLibrary: #( 'tree-sitter-typescript.so' ) | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-FAST-Utils/TSFASTBuilder.class.st",
"code": "Object subclass: #TSFASTBuilder\n\tinstanceVariableNames: 'tsLanguage languageName'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-FAST-Utils'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/sr... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "unix64LibraryName\n \n\t^ FFIUnix64LibraryFinder",
"suffix": "",
"completion": " findAnyLibrary: #( 'tree-sitter-typescript.so' )"
} |
610 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 29c886a1b78efd20f3d7ac36c226b1279a87c22b | src/TreeSitter-Typescript/TSTypescriptLibrary.class.st | win32LibraryName
^ FFIWindowsLibraryFinder findAnyLibrary: #('tree-sitter-typescript.dll') | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-FAST-Utils/TSFASTBuilder.class.st",
"code": "Object subclass: #TSFASTBuilder\n\tinstanceVariableNames: 'tsLanguage languageName'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-FAST-Utils'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/sr... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "win32LibraryName\n\n\t^ FFIWindowsLibraryFinder findAnyLibrary:",
"suffix": "",
"completion": " #('tree-sitter-typescript.dll')"
} |
611 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSLanguageTypescriptTest.class.st | setUp
super setUp.
parser := TSParser new.
typescriptLanguage := TSLanguage typescript .
parser language: typescriptLanguage. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "setUp\n\n\tsuper setUp.\n\n\tparser",
"suffix": ".\n\ttypescriptLanguage := TSLanguage typescript .\n\tparser language: typescriptLanguage.",
"completion": " := TSParser new"
} |
612 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSLanguageTypescriptTest.class.st | setUp
super setUp.
parser := TSParser new.
typescriptLanguage := TSLanguage typescript .
parser language: typescriptLanguage. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "setUp\n\n\tsuper setUp.\n\n\tparser := TSParser new.\n\ttypescriptLanguage",
"suffix": " .\n\tparser language: typescriptLanguage.",
"completion": " := TSLanguage typescript"
} |
613 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSLanguageTypescriptTest.class.st | testCollectAllSymbolOfOneSymbolType
self
assert:
(parser language symbolsOfType: TSSymbolType tssymboltyperegular)
size
equals: 192 | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testCollectAllSymbolOfOneSymbolType\n\n\tself\n\t\tassert:\n\t\t(parser language symbolsOfType: TSSymbolType tssymboltyperegular)",
"suffix": "",
"completion": "\n\t\t\tsize\n\t\tequals: 192"
} |
614 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSLanguageTypescriptTest.class.st | testRetrieveSymbolName
self assert: (parser language nameOfSymbol: 1) equals: 'identifier' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testRetrieveSymbolName\n\n\tself assert: (parser language nameOfSymbol: 1",
"suffix": "",
"completion": ") equals: 'identifier'"
} |
615 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSLanguageTypescriptTest.class.st | testRetrieveSymbolType
self assert: (parser language typeOfSymbol: 1) equals: TSSymbolType tssymboltyperegular | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testRetrieveSymbolType\n\n\tself assert: (parser language",
"suffix": "",
"completion": " typeOfSymbol: 1) equals: TSSymbolType tssymboltyperegular"
} |
616 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSLanguageTypescriptTest.class.st | testTypescriptNumberOfSymbol
self assert: parser language symbolCount equals: 383 | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testTypescriptNumberOfSymbol\n\n\tself assert: parser language",
"suffix": "",
"completion": " symbolCount equals: 383"
} |
617 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | setUp
super setUp.
parser := TSParser new.
typescriptLanguage := TSLanguage typescript.
parser language: typescriptLanguage . | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "setUp\n\n\tsuper setUp.\n\n\tparser",
"suffix": ".\n\ttypescriptLanguage := TSLanguage typescript.\n\tparser language: typescriptLanguage .",
"completion": " := TSParser new"
} |
618 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | setUp
super setUp.
parser := TSParser new.
typescriptLanguage := TSLanguage typescript.
parser language: typescriptLanguage . | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "setUp\n\n\tsuper setUp.\n\n\tparser := TSParser new.\n\ttypescriptLanguage",
"suffix": ".\n\tparser language: typescriptLanguage .",
"completion": " := TSLanguage typescript"
} |
619 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testChildrenCollection
| string tree |
string := 'const car: { type: string, model: string, year: number } = {
type: "Toyota",
model: "Corolla",
year: 2009
};'.
tree := parser parseString: string.
self assert: tree rootNode collectNamedChild size equals: 1.
self assert: tree rootNode ... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testChildrenCollection\n\n\t| string tree |\n\tstring := 'const car: { type: string, model: string, year: number } = {\n \t\t\t\t\ttype: \"Toyota\",\n \t\t\t\t\tmodel: \"Corolla\",\n \t\t\t\t\tyear: 2009\n\t\t\t\t};'.\n\n\ttree :... |
620 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testChildrenCollection
| string tree |
string := 'const car: { type: string, model: string, year: number } = {
type: "Toyota",
model: "Corolla",
year: 2009
};'.
tree := parser parseString: string.
self assert: tree rootNode collectNamedChild size equals: 1.
self assert: tree rootNode ... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testChildrenCollection\n\n\t| string tree |\n\tstring := 'const car: { type: string, model: string, year: number } = {\n \t\t\t\t\ttype: \"Toyota\",\n \t\t\t\t\tmodel: \"Corolla\",\n \t\t\t\t\tyear: 2009\n\t\t\t\t};'.\n\n\ttree :... |
621 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testChildrenCollection
| string tree |
string := 'const car: { type: string, model: string, year: number } = {
type: "Toyota",
model: "Corolla",
year: 2009
};'.
tree := parser parseString: string.
self assert: tree rootNode collectNamedChild size equals: 1.
self assert: tree rootNode ... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testChildrenCollection\n\n\t| string tree |\n\tstring := 'const car: { type: string, model: string, year: number } = {\n \t\t\t\t\ttype: \"Toyota\",\n \t\t\t\t\tmodel: \"Corolla\",\n \t\t\t\t\tyear: 2009\n\t\t\t\t};'.\n\n\ttree :... |
622 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testFieldsNamesCollection
| string tree fieldsDict|
string := 'function deleteUser(user: User) {
// This is a comment
}'.
tree := parser parseString: string.
fieldsDict := tree rootNode namedChildren first collectFieldNameOfNamedChild.
self assert: fieldsDict keys first equals: 'name'.
self ass... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 4,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testFieldsNamesCollection\n\n\t| string tree fieldsDict|\n\tstring := 'function deleteUser(user: User) {\n \t\t\t\t\t// This is a comment\n\t\t\t\t }'.\n\n\ttree := parser parseString: string.\n\t\n\tfieldsDict := tree rootNode na... |
623 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testFieldsNamesCollection
| string tree fieldsDict|
string := 'function deleteUser(user: User) {
// This is a comment
}'.
tree := parser parseString: string.
fieldsDict := tree rootNode namedChildren first collectFieldNameOfNamedChild.
self assert: fieldsDict keys first equals: 'name'.
self ass... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testFieldsNamesCollection\n\n\t| string tree fieldsDict|\n\tstring := 'function deleteUser(user: User) {\n \t\t\t\t\t// This is a comment\n\t\t\t\t }'.\n\n\ttree := parser parseString: string.\n\t\n\tfieldsDict := tree rootNode na... |
624 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testFieldsNamesCollection
| string tree fieldsDict|
string := 'function deleteUser(user: User) {
// This is a comment
}'.
tree := parser parseString: string.
fieldsDict := tree rootNode namedChildren first collectFieldNameOfNamedChild.
self assert: fieldsDict keys first equals: 'name'.
self ass... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "testFieldsNamesCollection\n\n\t| string tree fieldsDict|\n\tstring := 'function deleteUser(user: User) {\n \t\t\t\t\t// This is a comment\n\t\t\t\t }'.\n\n\ttree",
"suffix": ".\n\t\n\tfieldsDict := tree rootNode namedChildren first c... |
625 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptClass
| string tree |
string := 'class Person {
name: string;
}'.
tree := parser parseString: string.
self assert: tree rootNode namedChildCount equals: 1.
self assert: tree rootNode namedChildren first type equals: 'class_declaration'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "testParseTypescriptClass\n\n\t| string tree |\n\tstring := 'class Person {\n \t\t\t\t\tname: string;\n\t\t\t\t }'.\n\n\ttree",
"suffix": ".\n\tself assert: tree rootNode namedChildCount equals: 1.\n\tself assert: tree rootNode namedC... |
626 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptClass
| string tree |
string := 'class Person {
name: string;
}'.
tree := parser parseString: string.
self assert: tree rootNode namedChildCount equals: 1.
self assert: tree rootNode namedChildren first type equals: 'class_declaration'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testParseTypescriptClass\n\n\t| string tree |\n\tstring := 'class Person {\n \t\t\t\t\tname: string;\n\t\t\t\t }'.\n\n\ttree := parser parseString: string.\n\tself",
"suffix": ".\n\tself assert: tree rootNode namedChildren first... |
627 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptClass
| string tree |
string := 'class Person {
name: string;
}'.
tree := parser parseString: string.
self assert: tree rootNode namedChildCount equals: 1.
self assert: tree rootNode namedChildren first type equals: 'class_declaration'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testParseTypescriptClass\n\n\t| string tree |\n\tstring := 'class Person {\n \t\t\t\t\tname: string;\n\t\t\t\t }'.\n\n\ttree := parser parseString: string.\n\tself assert: tree rootNode namedChildCount equals: 1.\n\tself assert: t... |
628 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptClassAndExpression
| string tree |
string := 'class Person {
name: string;
}
const person = new Person();
person.name = "Jane"; '.
tree := parser parseString: string.
self assert: tree rootNode namedChildCount equals: 3.
self assert: tree rootNode namedChildren first type e... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testParseTypescriptClassAndExpression\n\n\t| string tree |\n\tstring := 'class Person {\n \t\t\t\t\tname: string;\n\t\t\t\t }\n\t\t\t\tconst person = new Person();\n\t\t\t\tperson.name = \"Jane\"; '.\n\n\ttree := parser parseStrin... |
629 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptClassAndExpression
| string tree |
string := 'class Person {
name: string;
}
const person = new Person();
person.name = "Jane"; '.
tree := parser parseString: string.
self assert: tree rootNode namedChildCount equals: 3.
self assert: tree rootNode namedChildren first type e... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 4,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "testParseTypescriptClassAndExpression\n\n\t| string tree |\n\tstring := 'class Person {\n \t\t\t\t\tname: string;\n\t\t\t\t }\n\t\t\t\tconst person = new Person();\n\t\t\t\tperson.name = \"Jane\"; '.\n\n\ttree := parser parseStrin... |
630 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptClassAndExpression
| string tree |
string := 'class Person {
name: string;
}
const person = new Person();
person.name = "Jane"; '.
tree := parser parseString: string.
self assert: tree rootNode namedChildCount equals: 3.
self assert: tree rootNode namedChildren first type e... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "testParseTypescriptClassAndExpression\n\n\t| string tree |\n\tstring := 'class Person {\n \t\t\t\t\tname: string;\n\t\t\t\t }\n\t\t\t\tconst person = new Person();\n\t\t\t\tperson.name = \"Jane\"; '.\n\n\ttree := parser parseStrin... |
631 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptFunction
| string tree |
string := 'function deleteUser(user: User) {
// This is a comment
}'.
tree := parser parseString: string.
self assert: tree rootNode childCount equals: 1.
self assert: tree rootNode namedChildren first type equals: 'function_declaration'.
self assert: tree... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testParseTypescriptFunction\n\n\t| string tree |\n\tstring := 'function deleteUser(user: User) {\n \t\t\t\t\t// This is a comment\n\t\t\t\t }'.\n\n\ttree := parser parseString: string.\n\tself assert: tree rootNode childCount equa... |
632 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptFunction
| string tree |
string := 'function deleteUser(user: User) {
// This is a comment
}'.
tree := parser parseString: string.
self assert: tree rootNode childCount equals: 1.
self assert: tree rootNode namedChildren first type equals: 'function_declaration'.
self assert: tree... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 6,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "testParseTypescriptFunction\n\n\t| string tree |\n\tstring := 'function deleteUser(user: User) {\n \t\t\t\t\t// This is a comment\n\t\t\t\t }'.\n\n\ttree := parser parseString: string.\n\tself assert: tree rootNode childCount equa... |
633 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ec43a9c8a8e21cf6b9717d14eded4d501955b51 | src/TreeSitter-Tests/TSParserTypescriptTest.class.st | testParseTypescriptFunction
| string tree |
string := 'function deleteUser(user: User) {
// This is a comment
}'.
tree := parser parseString: string.
self assert: tree rootNode childCount equals: 1.
self assert: tree rootNode namedChildren first type equals: 'function_declaration'.
self assert: tree... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "testParseTypescriptFunction\n\n\t| string tree |\n\tstring := 'function deleteUser(user: User) {\n \t\t\t\t\t// This is a comment\n\t\t\t\t }'.\n\n\ttree := parser parseString: string.\n\tself assert: tree rootNode childCount equa... |
634 | https://github.com/Evref-BL/Pharo-Tree-Sitter | b2d63b79238fa6a7abbeeaeb3ce6ed9e7611d4a7 | src/BaselineOfTreeSitter/BaselineOfTreeSitter.class.st | definePackages: spec
spec
package: 'TreeSitter';
package: 'TreeSitter-Tests' with: [
spec requires:
#( 'TreeSitter' 'TreeSitter-Python' 'TreeSitter-Groovy' 'TreeSitter-Typescript') ];
package: 'TreeSitter-Groovy'
with: [ spec requires: #( 'TreeSitter' ) ];
package: 'TreeSitter-Python'
wit... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "FFIOpaqueObject subclass: #TSParser\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSParser.class.st",
"code": "... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "definePackages: spec\n \n \tspec\n \t\tpackage: 'TreeSitter';\n \t\tpackage: 'TreeSitter-Tests' with: [\n \t\t\tspec requires:\n\t\t\t\t\t#( 'TreeSitter' 'TreeSitter-Python' 'TreeSitter-Groovy' 'TreeSitter-Typescript') ];\n \t\tpac... |
635 | https://github.com/Evref-BL/Pharo-Tree-Sitter | ee6edd298244c7cdc44a802e15ffc4e8067a3923 | src/TreeSitter/TSLibrary.class.st | ts_tree_edit: aTSTree forInputEdit: aTSInputEdit
^ self ffiCall:
'void ts_tree_edit(TSTree *aTSTree, const TSInputEdit *aTSInputEdit)' | [] | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_tree_edit: aTSTree forInputEdit: aTSInputEdit\n\t\n\t^",
"suffix": "",
"completion": " self ffiCall:\n\t\t 'void ts_tree_edit(TSTree *aTSTree, const TSInputEdit *aTSInputEdit)'"
} |
636 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 87542efd0d01f44de5f02d6baf0e8fdab39c5833 | src/TreeSitter/TSLibrary.class.st | ts_parser_parse: old_tree forInput: aTSInput using: aParser
"Use the parser to parse some source code and create a syntax tree. If you are parsing this document for the first time, pass null for the old_tree parameter. Otherwise, if you have already parsed an earlier version of this document and the document has sin... | [] | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_parser_parse: old_tree forInput: aTSInput using: aParser\n\t\n\t\"Use the parser to parse some source code and create a syntax tree. If you are parsing this document for the first time, pass null for the old_tree parameter. Otherwise, if... |
637 | https://github.com/Evref-BL/Pharo-Tree-Sitter | fe95954d0b5c59214d46955a1134049c12f30c42 | src/TreeSitter/TSParser.class.st | editTree: aTree usingInputEdit: anInput
TSLibrary uniqueInstance ts_tree_edit: aTree forInputEdit: anInput. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-FAST-Utils/TSFASTImporter.class.st",
"code": "TSVisitor subclass: #TSFASTImporter\n\tinstanceVariableNames: 'tsLanguage languageName model originString'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-FAST-Utils'"
},
{
"filepath": "repo_cl... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "editTree: aTree usingInputEdit: anInput\n\n\tTSLibrary",
"suffix": ".",
"completion": " uniqueInstance ts_tree_edit: aTree forInputEdit: anInput"
} |
638 | https://github.com/Evref-BL/Pharo-Tree-Sitter | fe95954d0b5c59214d46955a1134049c12f30c42 | src/TreeSitter/TSParser.class.st | parseString: aString usingTree: aTree
"to be used after editing the old tree which must be past here as a parameter to make an incremental parsing"
| stringToConsider |
stringToConsider := aString withUnixLineEndings.
^ TSLibrary uniqueInstance
ts_parser: self
_parse_string: stringToConsider
ofLengt... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-FAST-Utils/TSFASTImporter.class.st",
"code": "TSVisitor subclass: #TSFASTImporter\n\tinstanceVariableNames: 'tsLanguage languageName model originString'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-FAST-Utils'"
},
{
"filepath": "repo_cl... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "parseString: aString usingTree: aTree\n\n\t\"to be used after editing the old tree which must be past here as a parameter to make an incremental parsing\"\n\t\n\t| stringToConsider |\n\tstringToConsider",
"suffix": ".\n\t^ TSLibrary u... |
639 | https://github.com/Evref-BL/Pharo-Tree-Sitter | fe95954d0b5c59214d46955a1134049c12f30c42 | src/TreeSitter/TSParser.class.st | parseString: aString usingTree: aTree
"to be used after editing the old tree which must be past here as a parameter to make an incremental parsing"
| stringToConsider |
stringToConsider := aString withUnixLineEndings.
^ TSLibrary uniqueInstance
ts_parser: self
_parse_string: stringToConsider
ofLengt... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter-FAST-Utils/TSFASTImporter.class.st",
"code": "TSVisitor subclass: #TSFASTImporter\n\tinstanceVariableNames: 'tsLanguage languageName model originString'\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter-FAST-Utils'"
},
{
"filepath": "repo_cl... | {
"fim_idx": 1,
"mask_type": "return",
"n_masked_tokens": 8,
"prefix": "parseString: aString usingTree: aTree\n\n\t\"to be used after editing the old tree which must be past here as a parameter to make an incremental parsing\"\n\t\n\t| stringToConsider |\n\tstringToConsider := aString withUnixLineEndings.\n\t^ ... |
640 | https://github.com/Evref-BL/Pharo-Tree-Sitter | f80f60276f7e5cf8c268fdeabbce640b9f648012 | src/TreeSitter/TSLibrary.class.st | ts_node_eq: aTSNode to: otherNode
^ self ffiCall: 'bool ts_node_eq(TSNode aTSNode, TSNode otherNode)' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_eq: aTSNode to: otherNode\n\n\t^",
"suffix": "",
"completion": " self ffiCall: 'bool ts_node_eq(TSNode aTSNode, TSNode otherNode)'"
} |
641 | https://github.com/Evref-BL/Pharo-Tree-Sitter | f80f60276f7e5cf8c268fdeabbce640b9f648012 | src/TreeSitter/TSLibrary.class.st | ts_node_has_changes: aTSNode
"Check if a syntax node has been edited."
^ self ffiCall: 'bool ts_node_has_changes(TSNode aTSNode)' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_has_changes: aTSNode\n\t\n\t\"Check if a syntax node has been edited.\"\n\t\n\t^",
"suffix": "",
"completion": " self ffiCall: 'bool ts_node_has_changes(TSNode aTSNode)'"
} |
642 | https://github.com/Evref-BL/Pharo-Tree-Sitter | f80f60276f7e5cf8c268fdeabbce640b9f648012 | src/TreeSitter/TSLibrary.class.st | ts_node_parent: aTSNode
"Get the node's immediate parent.
Prefer [`ts_node_child_containing_descendant`] for iterating over the node's ancestors.."
^ self ffiCall: 'TSNode ts_node_parent(TSNode aTSNode)' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_parent: aTSNode\n\t\n\t\"Get the node's immediate parent.\n \tPrefer [`ts_node_child_containing_descendant`] for iterating over the node's ancestors..\"\n\t\n\t^",
"suffix": "",
"completion": " self ffiCall: 'TSNode ts_node_pare... |
643 | https://github.com/Evref-BL/Pharo-Tree-Sitter | f80f60276f7e5cf8c268fdeabbce640b9f648012 | src/TreeSitter/TSLibrary.class.st | ts_node_string: aTSNode
^ self ffiCall: 'char *ts_node_string(TSNode aTSNode)' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_string: aTSNode\n\n\t^",
"suffix": "",
"completion": " self ffiCall: 'char *ts_node_string(TSNode aTSNode)'"
} |
644 | https://github.com/Evref-BL/Pharo-Tree-Sitter | f80f60276f7e5cf8c268fdeabbce640b9f648012 | src/TreeSitter/TSNode.class.st | hasChanges
^ TSLibrary uniqueInstance ts_node_has_changes: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "hasChanges\n\n\t^ TSLibrary",
"suffix": "",
"completion": " uniqueInstance ts_node_has_changes: self"
} |
645 | https://github.com/Evref-BL/Pharo-Tree-Sitter | f80f60276f7e5cf8c268fdeabbce640b9f648012 | src/TreeSitter/TSNode.class.st | isEqualTo: anotherNode
^ TSLibrary uniqueInstance ts_node_eq: self to: anotherNode | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "isEqualTo: anotherNode\n\n\t^ TSLibrary uniqueInstance ts_node_eq:",
"suffix": "",
"completion": " self to: anotherNode"
} |
646 | https://github.com/Evref-BL/Pharo-Tree-Sitter | f80f60276f7e5cf8c268fdeabbce640b9f648012 | src/TreeSitter/TSNode.class.st | parent
^ TSLibrary uniqueInstance ts_node_parent: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "parent\n\n\t^",
"suffix": "",
"completion": " TSLibrary uniqueInstance ts_node_parent: self"
} |
647 | https://github.com/Evref-BL/Pharo-Tree-Sitter | f80f60276f7e5cf8c268fdeabbce640b9f648012 | src/TreeSitter/TSNode.class.st | string
^ TSLibrary uniqueInstance ts_node_string: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "string\n\n\t^ TSLibrary",
"suffix": "",
"completion": " uniqueInstance ts_node_string: self"
} |
648 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ca494d849873ef9f0bf144fc3d80e6cfa8d8689 | src/TreeSitter/TSInputEdit.class.st | createPointWithRow: aRow andColumn: aColumn
| newPoint |
newPoint := TSPoint new.
^ newPoint
row: aRow;
column: aColumn. | [] | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "createPointWithRow: aRow andColumn: aColumn\n\t\n\t| newPoint |\n\t\n\tnewPoint",
"suffix": ".\n\t^ newPoint\n\t\t\trow: aRow;\n\t\t\tcolumn: aColumn.",
"completion": " := TSPoint new"
} |
649 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 8ca494d849873ef9f0bf144fc3d80e6cfa8d8689 | src/TreeSitter/TSInputEdit.class.st | createPointWithRow: aRow andColumn: aColumn
| newPoint |
newPoint := TSPoint new.
^ newPoint
row: aRow;
column: aColumn. | [] | {
"fim_idx": 1,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "createPointWithRow: aRow andColumn: aColumn\n\t\n\t| newPoint |\n\t\n\tnewPoint := TSPoint new.\n\t^ newPoint\n\t\t\trow:",
"suffix": ".",
"completion": " aRow;\n\t\t\tcolumn: aColumn"
} |
650 | https://github.com/Evref-BL/Pharo-Tree-Sitter | c581741662168844e348c897bf0ac92eb159776f | src/TreeSitter/TSLibrary.class.st | ts_node_end_byte: aTSNode
^ self ffiCall:
'uint32 ts_node_end_byte(TSNode aTSNode)' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSNode.class.st",
"code": "FFIStructure subclass: #TSNode\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_CONTEXT3 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": ... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_end_byte: aTSNode\n\n\t^",
"suffix": "",
"completion": " self ffiCall:\n\t\t 'uint32 ts_node_end_byte(TSNode aTSNode)'"
} |
651 | https://github.com/Evref-BL/Pharo-Tree-Sitter | c581741662168844e348c897bf0ac92eb159776f | src/TreeSitter/TSLibrary.class.st | ts_node_start_byte: aTSNode
^ self ffiCall:
'uint32 ts_node_start_byte(TSNode aTSNode)' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSNode.class.st",
"code": "FFIStructure subclass: #TSNode\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_CONTEXT3 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": ... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_start_byte: aTSNode\n\n\t^",
"suffix": "",
"completion": " self ffiCall:\n\t\t 'uint32 ts_node_start_byte(TSNode aTSNode)'"
} |
652 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 3f53f918dc6380c05a0b3a00a109ec627f016c9c | src/TreeSitter/TSNode.class.st | endByte
^ TSLibrary uniqueInstance ts_node_end_byte: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSNode.class.st",
"code": "FFIStructure subclass: #TSNode\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_CONTEXT3 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": ... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "endByte\n\n\t^ TSLibrary",
"suffix": "",
"completion": " uniqueInstance ts_node_end_byte: self"
} |
653 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 3f53f918dc6380c05a0b3a00a109ec627f016c9c | src/TreeSitter/TSNode.class.st | startByte
^ TSLibrary uniqueInstance ts_node_start_byte: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSNode.class.st",
"code": "FFIStructure subclass: #TSNode\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_CONTEXT3 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": ... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "startByte\n\n\t^ TSLibrary",
"suffix": "",
"completion": " uniqueInstance ts_node_start_byte: self"
} |
654 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 24ac487c10c205078d753d38e4b2a89172b9bc0f | src/TreeSitter/TSLibrary.class.st | ts_node_next_sibling: aTSNode
^ self ffiCall: 'TSNode ts_node_next_sibling(TSNode aTSNode)' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_next_sibling: aTSNode\n\n\t^",
"suffix": "",
"completion": " self ffiCall: 'TSNode ts_node_next_sibling(TSNode aTSNode)'"
} |
655 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 24ac487c10c205078d753d38e4b2a89172b9bc0f | src/TreeSitter/TSLibrary.class.st | ts_node_prev_sibling: aTSNode
^ self ffiCall: 'TSNode ts_node_prev_sibling(TSNode aTSNode);' | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ts_node_prev_sibling: aTSNode\n\n\t^",
"suffix": "",
"completion": " self ffiCall: 'TSNode ts_node_prev_sibling(TSNode aTSNode);'"
} |
656 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 24ac487c10c205078d753d38e4b2a89172b9bc0f | src/TreeSitter/TSNode.class.st | nextSibling
^ TSLibrary uniqueInstance ts_node_next_sibling: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "nextSibling\n\t\n\t^",
"suffix": "",
"completion": " TSLibrary uniqueInstance ts_node_next_sibling: self"
} |
657 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 24ac487c10c205078d753d38e4b2a89172b9bc0f | src/TreeSitter/TSNode.class.st | previousSibling
^ TSLibrary uniqueInstance ts_node_prev_sibling: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "previousSibling\n\t\n\t^",
"suffix": "",
"completion": " TSLibrary uniqueInstance ts_node_prev_sibling: self"
} |
658 | https://github.com/Evref-BL/Pharo-Tree-Sitter | beccde4109975fcb37957abbf8505bb6bb3e12d8 | src/TreeSitter/TSNode.class.st | firstNamedChild
^ TSLibrary uniqueInstance ts_node: self _named_child_count: 0 | [] | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 5,
"prefix": "firstNamedChild\n\n\t^ TSLibrary",
"suffix": "",
"completion": " uniqueInstance ts_node: self _named_child_count: 0"
} |
659 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 2b90881dc56e100989fdd6d9cc61d545cbdfc8fc | src/TreeSitter/TSParser.class.st | reset
TSLibrary uniqueInstance ts_parser_reset: self | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSTreeCursor.class.st",
"code": "FFIStructure subclass: #TSTreeCursor\n\tinstanceVariableNames: ''\n\tclassVariableNames: 'OFFSET_CONTEXT0 OFFSET_CONTEXT1 OFFSET_CONTEXT2 OFFSET_ID OFFSET_TREE'\n\tpackage: 'TreeSitter'"
},
{
"filepath": "rep... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "reset\n\n\tTSLibrary",
"suffix": "",
"completion": " uniqueInstance ts_parser_reset: self"
} |
660 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | parseFunction
stringToParse := 'function deleteUser(user: User) {
// This is a comment
}'.
^ parser parseString: stringToParse. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "parseFunction\n\t \n\tstringToParse := 'function deleteUser(user: User) {\n \t\t\t\t\t// This is a comment\n\t\t\t\t }'. \n\t^",
"suffix": ".",
"completion": " parser parseString: stringToParse"
} |
661 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | setUp
|tree|
super setUp.
parser := TSParser new.
parser language:TSLanguage typescript.
tree := self parseFunction.
rootNode := tree rootNode. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 3,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "setUp\n\n\t|tree|\n\tsuper setUp.\n\tparser := TSParser new. \n\tparser language:TSLanguage typescript.\n\ttree := self parseFunction. \n\trootNode",
"suffix": ".",
"completion": " := tree rootNode"
} |
662 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | setUp
|tree|
super setUp.
parser := TSParser new.
parser language:TSLanguage typescript.
tree := self parseFunction.
rootNode := tree rootNode. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 2,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "setUp\n\n\t|tree|\n\tsuper setUp.\n\tparser := TSParser new. \n\tparser language:TSLanguage typescript.\n\ttree",
"suffix": ". \n\trootNode := tree rootNode.",
"completion": " := self parseFunction"
} |
663 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | setUp
|tree|
super setUp.
parser := TSParser new.
parser language:TSLanguage typescript.
tree := self parseFunction.
rootNode := tree rootNode. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "setUp\n\n\t|tree|\n\tsuper setUp.\n\tparser",
"suffix": ". \n\tparser language:TSLanguage typescript.\n\ttree := self parseFunction. \n\trootNode := tree rootNode.",
"completion": " := TSParser new"
} |
664 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testChildCound
self assert: rootNode childCount equals: 1.
self assert: rootNode firstNamedChild childCount equals: 4. "not sure why 4 and not 3" | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testChildCound\n \n\tself",
"suffix": ". \n\tself assert: rootNode firstNamedChild childCount equals: 4. \"not sure why 4 and not 3\"",
"completion": " assert: rootNode childCount equals: 1"
} |
665 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testChildCound
self assert: rootNode childCount equals: 1.
self assert: rootNode firstNamedChild childCount equals: 4. "not sure why 4 and not 3" | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testChildCound\n \n\tself assert: rootNode childCount equals: 1. \n\tself assert: rootNode",
"suffix": ". \"not sure why 4 and not 3\"",
"completion": " firstNamedChild childCount equals: 4"
} |
666 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testCollectFieldNameOfNamedChild
|dict|
dict := rootNode firstNamedChild collectFieldNameOfNamedChild.
self assert: dict keys size equals: 3.
self assert: dict keys first equals: 'name'.
self assert: dict keys second equals: 'parameters'.
self assert: dict keys third equals: 'body'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 4,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testCollectFieldNameOfNamedChild\n \n\t|dict|\n\t\n\tdict := rootNode firstNamedChild collectFieldNameOfNamedChild.\n\n\tself assert: dict keys size equals: 3.\n\tself assert: dict keys first equals: 'name'.\n\tself assert: dict k... |
667 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testCollectFieldNameOfNamedChild
|dict|
dict := rootNode firstNamedChild collectFieldNameOfNamedChild.
self assert: dict keys size equals: 3.
self assert: dict keys first equals: 'name'.
self assert: dict keys second equals: 'parameters'.
self assert: dict keys third equals: 'body'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testCollectFieldNameOfNamedChild\n \n\t|dict|\n\t\n\tdict := rootNode firstNamedChild collectFieldNameOfNamedChild.\n\n\tself assert: dict keys size equals: 3.\n\tself assert: dict keys first equals: 'name'.\n\tself assert:",
"s... |
668 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testCollectFieldNameOfNamedChild
|dict|
dict := rootNode firstNamedChild collectFieldNameOfNamedChild.
self assert: dict keys size equals: 3.
self assert: dict keys first equals: 'name'.
self assert: dict keys second equals: 'parameters'.
self assert: dict keys third equals: 'body'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testCollectFieldNameOfNamedChild\n \n\t|dict|\n\t\n\tdict := rootNode firstNamedChild collectFieldNameOfNamedChild.\n\n\tself assert: dict keys size equals: 3.\n\tself",
"suffix": ".\n\tself assert: dict keys second equals: 'par... |
669 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testCollectNamedChild
|childs|
childs := rootNode firstNamedChild collectNamedChild.
self assert: childs size equals: 3.
self assert: childs second collectNamedChild size equals: 1. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "testCollectNamedChild\n \n\t|childs|\n\t\n\tchilds :=",
"suffix": ".\n\n\tself assert: childs size equals: 3.\n\tself assert: childs second collectNamedChild size equals: 1.",
"completion": " rootNode firstNamedChild collectNamedCh... |
670 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testCollectNamedChild
|childs|
childs := rootNode firstNamedChild collectNamedChild.
self assert: childs size equals: 3.
self assert: childs second collectNamedChild size equals: 1. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testCollectNamedChild\n \n\t|childs|\n\t\n\tchilds := rootNode firstNamedChild collectNamedChild.\n\n\tself",
"suffix": ".\n\tself assert: childs second collectNamedChild size equals: 1.",
"completion": " assert: childs size e... |
671 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testCollectNamedChild
|childs|
childs := rootNode firstNamedChild collectNamedChild.
self assert: childs size equals: 3.
self assert: childs second collectNamedChild size equals: 1. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testCollectNamedChild\n \n\t|childs|\n\t\n\tchilds := rootNode firstNamedChild collectNamedChild.\n\n\tself assert: childs size equals: 3.\n\tself assert: childs second",
"suffix": ".",
"completion": " collectNamedChild size e... |
672 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testDetectChildWithFieldName
|childs|
childs := rootNode firstNamedChild.
self assert: (childs detectChildWithFieldName: 'name') type equals: 'identifier'.
self assert: (childs detectChildWithFieldName: 'parameters') type equals: 'formal_parameters'.
self assert: (childs detectChildWithFieldName: 'body') ty... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testDetectChildWithFieldName\n \n\t|childs|\n\t\n\tchilds := rootNode firstNamedChild.\n\n\tself assert: (childs detectChildWithFieldName: 'name')",
"suffix": ". \n\tself assert: (childs detectChildWithFieldName: 'parameters') t... |
673 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testDetectChildWithFieldName
|childs|
childs := rootNode firstNamedChild.
self assert: (childs detectChildWithFieldName: 'name') type equals: 'identifier'.
self assert: (childs detectChildWithFieldName: 'parameters') type equals: 'formal_parameters'.
self assert: (childs detectChildWithFieldName: 'body') ty... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "testDetectChildWithFieldName\n \n\t|childs|\n\t\n\tchilds := rootNode firstNamedChild.\n\n\tself assert: (childs detectChildWithFieldName: 'name') type equals: 'identifier'. \n\tself assert: (childs detectChildWithFieldName: 'para... |
674 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testDetectChildWithFieldName
|childs|
childs := rootNode firstNamedChild.
self assert: (childs detectChildWithFieldName: 'name') type equals: 'identifier'.
self assert: (childs detectChildWithFieldName: 'parameters') type equals: 'formal_parameters'.
self assert: (childs detectChildWithFieldName: 'body') ty... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testDetectChildWithFieldName\n \n\t|childs|\n\t\n\tchilds := rootNode firstNamedChild.\n\n\tself assert: (childs detectChildWithFieldName: 'name') type equals: 'identifier'. \n\tself assert: (childs detectChildWithFieldName: 'para... |
675 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testEndByte
self assert: rootNode endByte equals: 68.
self assert: rootNode endByte equals: stringToParse size.
self assert: rootNode firstNamedChild firstNamedChild endByte equals: 19. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testEndByte\n \n\tself assert:",
"suffix": ".\n\tself assert: rootNode endByte equals: stringToParse size. \n\tself assert: rootNode firstNamedChild firstNamedChild endByte equals: 19.",
"completion": " rootNode endByte equa... |
676 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testEndByte
self assert: rootNode endByte equals: 68.
self assert: rootNode endByte equals: stringToParse size.
self assert: rootNode firstNamedChild firstNamedChild endByte equals: 19. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testEndByte\n \n\tself assert: rootNode endByte equals: 68.\n\tself assert: rootNode endByte",
"suffix": ". \n\tself assert: rootNode firstNamedChild firstNamedChild endByte equals: 19.",
"completion": " equals: stringToPars... |
677 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testEndByte
self assert: rootNode endByte equals: 68.
self assert: rootNode endByte equals: stringToParse size.
self assert: rootNode firstNamedChild firstNamedChild endByte equals: 19. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testEndByte\n \n\tself assert: rootNode endByte equals: 68.\n\tself assert: rootNode endByte equals: stringToParse size. \n\tself assert: rootNode",
"suffix": ".",
"completion": " firstNamedChild firstNamedChild endByte equa... |
678 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testEndPoint
self assert: rootNode endPoint row equals: 2.
self assert: rootNode endPoint column equals: 6.
self assert: rootNode firstNamedChild firstNamedChild endPoint row equals: 0.
self assert: rootNode firstNamedChild firstNamedChild endPoint column equals: 19. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testEndPoint\n \n\tself assert: rootNode endPoint row equals: 2.\n\tself assert: rootNode endPoint column equals: 6.\n\tself assert: rootNode",
"suffix": ".\n\tself assert: rootNode firstNamedChild firstNamedChild endPoint col... |
679 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testEndPoint
self assert: rootNode endPoint row equals: 2.
self assert: rootNode endPoint column equals: 6.
self assert: rootNode firstNamedChild firstNamedChild endPoint row equals: 0.
self assert: rootNode firstNamedChild firstNamedChild endPoint column equals: 19. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testEndPoint\n \n\tself assert: rootNode endPoint row equals: 2.\n\tself assert: rootNode endPoint",
"suffix": ".\n\tself assert: rootNode firstNamedChild firstNamedChild endPoint row equals: 0.\n\tself assert: rootNode firstN... |
680 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testEndPoint
self assert: rootNode endPoint row equals: 2.
self assert: rootNode endPoint column equals: 6.
self assert: rootNode firstNamedChild firstNamedChild endPoint row equals: 0.
self assert: rootNode firstNamedChild firstNamedChild endPoint column equals: 19. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "testEndPoint\n \n\tself assert: rootNode endPoint row equals: 2.\n\tself assert: rootNode endPoint column equals: 6.\n\tself assert: rootNode firstNamedChild firstNamedChild endPoint row equals: 0.\n\tself",
"suffix": ".",
"... |
681 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testFieldNameOfChildNamedAt
self assert: (rootNode fieldNameOfChildNamedAt: 1) equals: ''.
self assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 1) equals: 'name'.
self assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 2) equals: 'parameters'.
self assert: (rootNode firstNamedChild fieldNa... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testFieldNameOfChildNamedAt\n \n\tself assert: (rootNode fieldNameOfChildNamedAt:",
"suffix": ".\n\tself assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 1) equals: 'name'.\n \tself assert: (rootNode firstNamedChild ... |
682 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testFieldNameOfChildNamedAt
self assert: (rootNode fieldNameOfChildNamedAt: 1) equals: ''.
self assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 1) equals: 'name'.
self assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 2) equals: 'parameters'.
self assert: (rootNode firstNamedChild fieldNa... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "testFieldNameOfChildNamedAt\n \n\tself assert: (rootNode fieldNameOfChildNamedAt: 1) equals: ''.\n\tself assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 1) equals: 'name'.\n \tself assert: (",
"suffix": ".\n \tself ... |
683 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testFieldNameOfChildNamedAt
self assert: (rootNode fieldNameOfChildNamedAt: 1) equals: ''.
self assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 1) equals: 'name'.
self assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 2) equals: 'parameters'.
self assert: (rootNode firstNamedChild fieldNa... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testFieldNameOfChildNamedAt\n \n\tself assert: (rootNode fieldNameOfChildNamedAt: 1) equals: ''.\n\tself assert: (rootNode firstNamedChild fieldNameOfChildNamedAt: 1) equals: 'name'.\n \tself assert: (rootNode firstNamedChild fi... |
684 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testFirstNamedChild
self assert: rootNode firstNamedChild isNotNil.
self assert: rootNode firstNamedChild class equals: TSNode.
self assert: rootNode firstNamedChild type equals: 'function_declaration'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testFirstNamedChild\n \n\tself assert:",
"suffix": ". \n\tself assert: rootNode firstNamedChild class equals: TSNode. \n\tself assert: rootNode firstNamedChild type equals: 'function_declaration'.",
"completion": " rootNode ... |
685 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testFirstNamedChild
self assert: rootNode firstNamedChild isNotNil.
self assert: rootNode firstNamedChild class equals: TSNode.
self assert: rootNode firstNamedChild type equals: 'function_declaration'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testFirstNamedChild\n \n\tself assert: rootNode firstNamedChild isNotNil. \n\tself",
"suffix": ". \n\tself assert: rootNode firstNamedChild type equals: 'function_declaration'.",
"completion": " assert: rootNode firstNamedCh... |
686 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testFirstNamedChild
self assert: rootNode firstNamedChild isNotNil.
self assert: rootNode firstNamedChild class equals: TSNode.
self assert: rootNode firstNamedChild type equals: 'function_declaration'. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testFirstNamedChild\n \n\tself assert: rootNode firstNamedChild isNotNil. \n\tself assert: rootNode firstNamedChild class equals: TSNode. \n\tself assert: rootNode firstNamedChild",
"suffix": ".",
"completion": " type equals... |
687 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testHasChanges
self assert: rootNode hasChanges equals: false .
self assert: rootNode firstNamedChild hasChanges equals: false. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testHasChanges\n \n\tself assert: rootNode",
"suffix": " .\n\tself assert: rootNode firstNamedChild hasChanges equals: false.",
"completion": " hasChanges equals: false"
} |
688 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testHasChanges
self assert: rootNode hasChanges equals: false .
self assert: rootNode firstNamedChild hasChanges equals: false. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testHasChanges\n \n\tself assert: rootNode hasChanges equals: false .\n\tself assert:",
"suffix": ".",
"completion": " rootNode firstNamedChild hasChanges equals: false"
} |
689 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testIsEqualTo
self assert: (rootNode isEqualTo: rootNode firstNamedChild ) equals: false.
self assert: (rootNode firstNamedChild isEqualTo: (rootNode namedChildAt: 1) ) equals: true. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testIsEqualTo\n \n\tself assert: (rootNode",
"suffix": ".\n\tself assert: (rootNode firstNamedChild isEqualTo: (rootNode namedChildAt: 1) ) equals: true.",
"completion": " isEqualTo: rootNode firstNamedChild ) equals: false"... |
690 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testIsEqualTo
self assert: (rootNode isEqualTo: rootNode firstNamedChild ) equals: false.
self assert: (rootNode firstNamedChild isEqualTo: (rootNode namedChildAt: 1) ) equals: true. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testIsEqualTo\n \n\tself assert: (rootNode isEqualTo: rootNode firstNamedChild ) equals: false.\n\tself assert: (rootNode firstNamedChild isEqualTo: (rootNode namedChildAt: 1",
"suffix": ".",
"completion": ") ) equals: true"... |
691 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testIsNamed
self assert: rootNode isNamed.
self assert: rootNode firstNamedChild isNamed. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testIsNamed\n \n\tself",
"suffix": ".\n\tself assert: rootNode firstNamedChild isNamed.",
"completion": " assert: rootNode isNamed"
} |
692 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testIsNamed
self assert: rootNode isNamed.
self assert: rootNode firstNamedChild isNamed. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testIsNamed\n \n\tself assert: rootNode isNamed.\n\tself",
"suffix": ".",
"completion": " assert: rootNode firstNamedChild isNamed"
} |
693 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testIsNull
self assert: rootNode isNull equals: false .
self assert: rootNode firstNamedChild isNull equals: false . | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testIsNull\n \n\tself assert: rootNode",
"suffix": " .\n\tself assert: rootNode firstNamedChild isNull equals: false .",
"completion": " isNull equals: false"
} |
694 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testIsNull
self assert: rootNode isNull equals: false .
self assert: rootNode firstNamedChild isNull equals: false . | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testIsNull\n \n\tself assert: rootNode isNull equals: false .\n\tself assert:",
"suffix": " .",
"completion": " rootNode firstNamedChild isNull equals: false"
} |
695 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testNamedChildAt
self assert: (rootNode namedChildAt: 1) class equals: TSNode .
self assert: (rootNode namedChildAt: 1) type equals: 'function_declaration'.
self assert: (rootNode firstNamedChild namedChildAt: 1) type equals: 'identifier'.
self assert: (rootNode firstNamedChild namedChildAt: 2) type equals: 'f... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "testNamedChildAt\n \n\tself assert: (rootNode namedChildAt: 1) class equals: TSNode .\n\tself assert:",
"suffix": ".\n\tself assert: (rootNode firstNamedChild namedChildAt: 1) type equals: 'identifier'.\n\tself assert: (rootNo... |
696 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testNamedChildAt
self assert: (rootNode namedChildAt: 1) class equals: TSNode .
self assert: (rootNode namedChildAt: 1) type equals: 'function_declaration'.
self assert: (rootNode firstNamedChild namedChildAt: 1) type equals: 'identifier'.
self assert: (rootNode firstNamedChild namedChildAt: 2) type equals: 'f... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "testNamedChildAt\n \n\tself assert: (",
"suffix": " .\n\tself assert: (rootNode namedChildAt: 1) type equals: 'function_declaration'.\n\tself assert: (rootNode firstNamedChild namedChildAt: 1) type equals: 'identifier'.\n\tsel... |
697 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testNamedChildAt
self assert: (rootNode namedChildAt: 1) class equals: TSNode .
self assert: (rootNode namedChildAt: 1) type equals: 'function_declaration'.
self assert: (rootNode firstNamedChild namedChildAt: 1) type equals: 'identifier'.
self assert: (rootNode firstNamedChild namedChildAt: 2) type equals: 'f... | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "testNamedChildAt\n \n\tself assert: (rootNode namedChildAt: 1) class equals: TSNode .\n\tself assert: (rootNode namedChildAt: 1) type equals: 'function_declaration'.\n\tself assert: (rootNode firstNamedChild namedChildAt: 1) typ... |
698 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testNamedChildCount
self assert: rootNode namedChildCount equals: 1 .
self assert: rootNode firstNamedChild namedChildCount equals: 3 .
self assert: (rootNode firstNamedChild namedChildAt: 2) firstNamedChild namedChildCount equals: 2. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testNamedChildCount\n \n\tself",
"suffix": " .\n\tself assert: rootNode firstNamedChild namedChildCount equals: 3 .\n\tself assert: (rootNode firstNamedChild namedChildAt: 2) firstNamedChild namedChildCount equals: 2.",
"com... |
699 | https://github.com/Evref-BL/Pharo-Tree-Sitter | 7a7dbb142e67b0aede408731895ca6da2d746c04 | src/TreeSitter-Tests/TSNodeTest.class.st | testNamedChildCount
self assert: rootNode namedChildCount equals: 1 .
self assert: rootNode firstNamedChild namedChildCount equals: 3 .
self assert: (rootNode firstNamedChild namedChildAt: 2) firstNamedChild namedChildCount equals: 2. | [
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "FFILibrary subclass: #TSLibrary\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'TreeSitter'"
},
{
"filepath": "repo_clone/Pharo-Tree-Sitter/src/TreeSitter/TSLibrary.class.st",
"code": "ts... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testNamedChildCount\n \n\tself assert: rootNode namedChildCount equals: 1 .\n\tself assert: rootNode",
"suffix": " .\n\tself assert: (rootNode firstNamedChild namedChildAt: 2) firstNamedChild namedChildCount equals: 2.",
"co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.