bolt
Releases (13)
-
1.27.0.0 indexed
-
1.26.0.0 unindexed
-
1.25.0.0 unindexed
-
1.24.0.0 unindexed
-
1.23.0.0 unindexed
-
1.22.0.0 unindexed
-
1.21.0.0 unindexed
-
1.20.0.0 unindexed
-
1.19.0.0 unindexed
-
1.18.0.0 unindexed
-
1.17.0.0 unindexed
-
1.12.0.0 invalid
expected a fresh constructor name (duplicate declaration: Ready)
-
1.11.0.0 invalid
expected a fresh constructor name (duplicate declaration: Ready)
Definitions (1,644)
src/lsp/report.bend
- type Rawan error bend reported, before it is placed: where it is (the Location's name, bend's key for its def), the line it marks (1-based, 0 for none), and its message
- type Stmsg and out are reversed
- def classifya report line's kind
- def marker.goreading a marker past its padding: `count` digits of `whole` so far, and at the first other character, the number they make when `>|` follows them
- def markerthe line number a source line of the report carries, when it does: `12>| code` marks line 12, padding before the digits aside; a line of context (`11 | code`) marks none, whatever its code holds
- def cleana message line, without its `- `
- def is_nagbend's "N is available: run bend update" is not part of a diagnostic
- def pusha non-empty, non-nag line onto the message
- def flushthe error so far, its message lines reversed, onto the ones before it; "no main to run" is a library, not an error
- def step.go
- def stepone report line
- def runevery report line, in order
- def finishthe errors once the lines are over, a pending one flushed
- def stemthe text before the first `~`: an instance of a template (`f~1`) is the template's
- def ownsis the name among these?
- def mineis an error at this place in the checked file?
- def diag.atan error placed: on its marked line, 0-based, in the checked file; on line 0, its message headed by where it is, in another file
- def diagan error placed, by the checked file's names
- def diagsevery error placed
- def parse_inthe checker's text as diagnostics, placed by the checked file's names when they are known
src/lsp/run.bend
- def runthe server over stdio, reading the disk
src/lsp/semantic.bend
- def legendthe legend, by index: keyword 0, function 1, type 2, enumMember 3, parameter 4, variable 5, property 6, string 7, number 8, comment 9, typeParameter 10
- type Sema classified token: where, how long, which type of the legend
- def upper_firstdoes the name start with a capital?
- def last_segmentthe last segment of a dotted name
- def of_kindthe legend's type for a binder of this kind (an item is a type when capitalized, else a function)
- def of_maybe_kindthe type for a binder that may not have been found (a variable then)
- def by_shapea name from elsewhere: braced: a constructor; capitalized: a type; dotted: a function; else a variable
- type Cursorthe binders and uses are in source order, as the tokens are: each token takes the head of either list when it sits there, so a document classifies in one pass
- def at_head_binddoes the next binder sit at this position?
- def at_head_usedoes the next use sit at this position?
- def behind_binda list's head is behind the token: it was never matched (a name the lexer and the binder disagree on); it is dropped so the rest can line up again
- def behind_useis the next use behind this position?
- def head_bind_kindthe type of the next binder
- type Entrya binder where the index keeps it: its name, position and kind
- type Indexbinders as a binary trie on the low bits of a key (a binder's line, or its name's hash), a leaf holding the entries that reach it in source order: a lookup is a walk down and a short scan, and finds what a scan of every binder from the front would, as a miss down the path is a miss everywhere
- def depthhow many bits of a key the index branches on
- def patha key's way down the index: its low bits, lowest first
- def idx.esthe entries at a leaf, none elsewhere
- def idx.nearthe half of a node a bit goes down, empty elsewhere
- def idx.joina node whose half down a bit is sub, and the other half far
- def idx.putthe index with an entry in front of the ones down its path
- def idx.findthe entries at the end of a key's path
- def hasha name's key: its chars folded, base 31
- def by_lineevery binder, keyed by its line, in source order
- def by_name.onean item or constructor into the index by its name's key; other binders pass
- def by_namethe file's items and constructors, keyed by name, in source order
- def at.gothe first entry at a position, as Bind.kind_at finds it
- def named.gothe first entry of a name, as Bind.kind_of_item finds it
- type Kindsa document's binders, indexed once for every use's lookup: by position, and its items and constructors by name
- def kind_atthe kind of the binder at a position
- def kind_of_itemthe kind of an item or constructor of the file, by name
- def of_targetthe type of a use, from what it refers to
- def head_use_classthe type of the next use
- def tail_bindsthe binders after the next
- def tail_usesthe uses after the next
- type Stepa token's class, when it has one, and the cursor after it
- def use_classthe class of a name: the use that sits on its head, else its own shape
- def name_stepa name token's type, taking the binder or the use that sits on it, and the cursor after it
- def of_toknames ask the binder; keywords are keywords; comments, strings and numbers are left to the editor's grammar, which tells a doc comment from a plain one
- def opens_bracedoes the token list start with `{`?
- def typ_ofa step's type
- def cur_ofa step's cursor
- def puta classified token onto the list, when it has a type
- def classifyevery token, in order, against the cursor
- def sent.onea token's column and length in an encoding, on its line's chars
- def sent.seekthe lines from a token's line on, from lines that start at line cur
- def sentthe tokens, in order, with columns and lengths in the negotiated encoding (enc.bend's out.col); lines starts at line cur, and the tokens never go back a line
- def encodeLSP's encoding: five numbers a token, positions relative to the previous token (a line delta, and a column delta on the same line, absolute on a new one)
- def data.of
- def dataa document's semantic tokens, encoded, their columns and lengths in the negotiated encoding
src/lsp/server.bend
- type Methodthe methods the server answers; MOther is anything else
- type Replya message the server sends: a notification, already printed, or the response to a request, its result or its error
- type Answerwhat a request is answered with: a result, or an error's code and message
- type Workwhat the work behind a method gave: the notifications it sends, the answer (read for a request only), the documents after it.
- type Outwhat one message leads to: the replies to send, whether to stop, the documents
- type Rolehow the server treats a method: a request owed one response, a notification, exit, or a method it does not know
- def methoda method by its name
- def rolea method's role
- def name_ofa message's method name, empty when it has none
- def id_ofa message's id: null for a notification
- def uri_ofthe document a request is about
- def line_ofthe line of a request's position
- def col_ofthe character of a request's position
- def texta reply as the text sent
- def noticesnotifications as replies
- def respondthe response to the request with this id
- def unknowna request the server does not know is refused; a notification is ignored
- def answeredthe work of a request: its result, no notifications
- def notedthe work of a notification: what it sends, and no answer
- def step.go
- def stepthe dispatcher's decision for one message, whatever its method's work gave: a request gets one response with its id, a notification its notices, exit stops, and a method it does not know is refused or ignored
- def pub.notea document's diagnostics, as the notification sent: the checker's errors, then the linter's findings
- def pub.candsthe bolt.bend candidates of a document's path, nearest first: the ones the CLI reads for a file at that path, run from the same directory
- def pub.lintthe linter's findings on the text the editor shows, each rule told the file's role among the marks, at the levels the nearest bolt.bend read gives them, less what the text's noqa comments silence, then the `noqa` rule's, which judges no project rule's code (the editor runs none); none for a bolt.bend, which is bolt's configuration, not source
- def pub.marksthe role marks `bolt <path>` reads from a World: the imports of every file of the tree (Plan.graph), each file read for its imports alone
- def pub.checkedopen or save: the checker's errors with the lint of the text, the errors kept for the changes after
- def pub.openopen: the document's text kept, then published with the checker's errors
- def pub.savesave: the text the editor shows published with the checker's new errors
- def pub.changechange: the new text kept, and its lint published with the checker's last errors and the marks read with them