More lua hints
This commit is contained in:
parent
141760a677
commit
f23f8db994
2 changed files with 16 additions and 7 deletions
|
@ -212,15 +212,24 @@ impl RegexRule for ScriptRule {
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(hints) = Hints::from_source(token.source(), &state.shared.lsp) {
|
||||||
|
hints.add(matches.get(0).unwrap().end(), result);
|
||||||
|
}
|
||||||
} else if kind == 2
|
} else if kind == 2
|
||||||
// Eval and Parse
|
// Eval and Parse
|
||||||
{
|
{
|
||||||
|
if let Some(hints) = Hints::from_source(token.source(), &state.shared.lsp) {
|
||||||
|
hints.add(matches.get(0).unwrap().end(), result.clone());
|
||||||
|
}
|
||||||
|
|
||||||
let parse_source = Rc::new(VirtualSource::new(
|
let parse_source = Rc::new(VirtualSource::new(
|
||||||
Token::new(0..source.content().len(), source.clone()),
|
Token::new(0..source.content().len(), source.clone()),
|
||||||
format!(":LUA:parse({})", source.name()),
|
format!(":LUA:parse({})", source.name()),
|
||||||
result,
|
result,
|
||||||
)) as Rc<dyn Source>;
|
)) as Rc<dyn Source>;
|
||||||
|
|
||||||
|
|
||||||
state.with_state(|new_state| {
|
state.with_state(|new_state| {
|
||||||
new_state.parser.parse_into(
|
new_state.parser.parse_into(
|
||||||
new_state,
|
new_state,
|
||||||
|
|
Loading…
Reference in a new issue