forked from reach-sh/reach-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request reach-sh#23 from chrisnevers/master
Utilize Reach's JSON Error Formatting
- Loading branch information
Showing
4 changed files
with
173 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
reach-ide/vscode-extension/project-a/server/src/keywordCompletion.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { CompletionItemKind } from 'vscode-languageserver'; | ||
|
||
export const reachCompletionKind: { [key : string]: CompletionItemKind } = { | ||
'Address': CompletionItemKind.TypeParameter, | ||
'array': CompletionItemKind.Function, | ||
'Array': CompletionItemKind.TypeParameter, | ||
'Array.concat': CompletionItemKind.Method, | ||
'Array.empty': CompletionItemKind.Method, | ||
'Array.forEach': CompletionItemKind.Method, | ||
'Array.iota': CompletionItemKind.Method, | ||
'Array.length': CompletionItemKind.Method, | ||
'Array.map': CompletionItemKind.Method, | ||
'Array.reduce': CompletionItemKind.Method, | ||
'Array.replicate': CompletionItemKind.Method, | ||
'Array.set': CompletionItemKind.Method, | ||
'Array.zip': CompletionItemKind.Method, | ||
'assert': CompletionItemKind.Function, | ||
'assume': CompletionItemKind.Function, | ||
'balance': CompletionItemKind.Function, | ||
'Bool': CompletionItemKind.TypeParameter, | ||
'Bytes': CompletionItemKind.TypeParameter, | ||
'checkCommitment': CompletionItemKind.Function, | ||
'closeTo': CompletionItemKind.Function, | ||
'const': CompletionItemKind.Keyword, | ||
'continue': CompletionItemKind.Keyword, | ||
'commit': CompletionItemKind.Function, | ||
'concat': CompletionItemKind.Function, | ||
'Data': CompletionItemKind.TypeParameter, | ||
'declassify': CompletionItemKind.Function, | ||
'digest': CompletionItemKind.Function, | ||
'Digest': CompletionItemKind.TypeParameter, | ||
'each': CompletionItemKind.Method, | ||
'ensure': CompletionItemKind.Function, | ||
'exit': CompletionItemKind.Function, | ||
'export': CompletionItemKind.Keyword, | ||
'forall': CompletionItemKind.Function, | ||
'forEach': CompletionItemKind.Function, | ||
'Fun': CompletionItemKind.TypeParameter, | ||
'function': CompletionItemKind.Keyword, | ||
'hasRandom': CompletionItemKind.Function, | ||
'if': CompletionItemKind.Keyword, | ||
'implies': CompletionItemKind.Function, | ||
'import': CompletionItemKind.Keyword, | ||
'interact': CompletionItemKind.Struct, | ||
'length': CompletionItemKind.Function, | ||
'makeCommitment': CompletionItemKind.Function, | ||
'makeEnum': CompletionItemKind.Function, | ||
'map': CompletionItemKind.Function, | ||
'Maybe': CompletionItemKind.TypeParameter, | ||
'Null': CompletionItemKind.TypeParameter, | ||
'Object': CompletionItemKind.TypeParameter, | ||
'Object.set': CompletionItemKind.Method, | ||
'only': CompletionItemKind.Method, | ||
'Participant.set': CompletionItemKind.Method, | ||
'pay': CompletionItemKind.Method, | ||
'possible': CompletionItemKind.Function, | ||
'publish': CompletionItemKind.Method, | ||
'Reach.App': CompletionItemKind.Function, | ||
'reduce': CompletionItemKind.Function, | ||
'require': CompletionItemKind.Function, | ||
'return': CompletionItemKind.Keyword, | ||
'set': CompletionItemKind.Function, | ||
'switch': CompletionItemKind.Keyword, | ||
'timeout': CompletionItemKind.Method, | ||
'transfer': CompletionItemKind.Function, | ||
'Tuple': CompletionItemKind.TypeParameter, | ||
'Tuple.length': CompletionItemKind.Method, | ||
'Tuple.set': CompletionItemKind.Method, | ||
'UInt': CompletionItemKind.TypeParameter, | ||
'unknowable': CompletionItemKind.Function, | ||
'wait': CompletionItemKind.Function, | ||
'while': CompletionItemKind.Keyword, | ||
'zip': CompletionItemKind.Function, | ||
}; | ||
|
||
export const reachKeywords = Object.keys(reachCompletionKind); |
Oops, something went wrong.