Skip to content

Add bufferSize and includedRanges options to parse function in TS def - #63

Merged
maxbrunsfeld merged 2 commits into
tree-sitter:masterfrom
Locale:add-included-ranges-option-to-parser
May 20, 2020
Merged

maxbrunsfeld merged 2 commits into
tree-sitter:masterfrom
Locale:add-included-ranges-option-to-parser

Conversation

@thibaultdalban

@thibaultdalban thibaultdalban commented May 20, 2020 •

Copy link
Copy Markdown
Contributor

The function signature of Parser.prototype.parse defined in index.js

Parser.prototype.parse = function(input, oldTree, {bufferSize, includedRanges}={})

accepts a third optional parameter.
This commit reflects the signature in TypeScript definition.

depends on #64

thibaultdalban added 2 commits May 20, 2020 14:28
A Range contains:
- startIndex
- endIndex
- startPosition
- endPosition
The function signature of `Parser.prototype.parse` defined in index.js
`Parser.prototype.parse = function(input, oldTree, {bufferSize,
includedRanges}={})` accepts a third optional parameter.
This commit reflects the signature in TypeScript definition.
@thibaultdalban thibaultdalban changed the title Add included ranges option to parser Add bufferSize and includedRanges options to parser function in TS def May 20, 2020
@thibaultdalban thibaultdalban changed the title Add bufferSize and includedRanges options to parser function in TS def Add bufferSize and includedRanges options to parse function in TS def May 20, 2020
@maxbrunsfeld
maxbrunsfeld merged commit c40d598 into tree-sitter:master May 20, 2020
@maxbrunsfeld

Copy link
Copy Markdown
Contributor

Thanks!

@thibaultdalban
thibaultdalban deleted the add-included-ranges-option-to-parser branch May 20, 2020 16:27
tmiland pushed a commit to atomeditor-io/node-tree-sitter that referenced this pull request Sep 29, 2026
…tree-sitter#63)

* Fix the TypeScript definition of a Range

A Range contains:
- startIndex
- endIndex
- startPosition
- endPosition

* Add `bufferSize` and `includedRanges` to TS def

The function signature of `Parser.prototype.parse` defined in index.js
`Parser.prototype.parse = function(input, oldTree, {bufferSize,
includedRanges}={})` accepts a third optional parameter.
This commit reflects the signature in TypeScript definition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants