nicer looking
This commit is contained in:
parent
8abbac4bc9
commit
e850952738
14 changed files with 547 additions and 104 deletions
|
|
@ -40,13 +40,13 @@ interface InputBlockProps extends State2Props<InputBlockState> {
|
|||
const computeSuggestions = (text, env, suggestionPriority: (s: SuggestionType) => number): PrioritizedSuggestionType[] => {
|
||||
const literals = attemptParseLiteral(text);
|
||||
|
||||
const ls = [
|
||||
const ls: SuggestionType[] = [
|
||||
// literals
|
||||
... literals.map((lit) => ["literal", text, lit]),
|
||||
|
||||
// names
|
||||
... trie.suggest(env.name2dyn)(text)(Infinity)
|
||||
.map(([name,type]) => ["name", name, type]),
|
||||
.map(([name,type]) => ["name", name, {...type, substitutions: new Map()}]),
|
||||
]
|
||||
// return ls;
|
||||
return ls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue