Skip to content

Commit b1eebc2

Browse files
committed
impl TypeMapped ast
1 parent b3cff9b commit b1eebc2

File tree

11 files changed

+395
-69
lines changed

11 files changed

+395
-69
lines changed

crates/emmylua_code_analysis/src/compilation/analyzer/doc/infer_type.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ pub fn infer_type(analyzer: &mut DocAnalyzer, node: LuaDocType) -> LuaType {
119119
return LuaType::ConditionalInfer(ArcIntern::new(SmolStr::new(&name)));
120120
}
121121
}
122+
_ => (),
122123
}
123124
LuaType::Unknown
124125
}

crates/emmylua_parser/src/grammar/doc/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ fn parse_docs(p: &mut LuaDocParser) {
2323
while p.current_token() != LuaTokenKind::TkEof {
2424
match p.current_token() {
2525
LuaTokenKind::TkDocStart => {
26-
p.set_state(LuaDocLexerState::Tag);
26+
p.set_lexer_state(LuaDocLexerState::Tag);
2727
p.bump();
2828
parse_tag(p);
2929
}
3030
LuaTokenKind::TkDocLongStart => {
31-
p.set_state(LuaDocLexerState::Tag);
31+
p.set_lexer_state(LuaDocLexerState::Tag);
3232
p.bump();
3333
parse_long_tag(p);
3434
}
3535
LuaTokenKind::TkNormalStart => {
36-
p.set_state(LuaDocLexerState::NormalDescription);
36+
p.set_lexer_state(LuaDocLexerState::NormalDescription);
3737
p.bump();
3838

3939
if_token_bump(p, LuaTokenKind::TkWhitespace);
@@ -48,7 +48,7 @@ fn parse_docs(p: &mut LuaDocParser) {
4848
parse_normal_description(p);
4949
}
5050
LuaTokenKind::TkLongCommentStart => {
51-
p.set_state(LuaDocLexerState::LongDescription);
51+
p.set_lexer_state(LuaDocLexerState::LongDescription);
5252
p.bump();
5353

5454
parse_description(p);
@@ -72,7 +72,7 @@ fn parse_docs(p: &mut LuaDocParser) {
7272
continue;
7373
}
7474

75-
p.set_state(LuaDocLexerState::Init);
75+
p.set_lexer_state(LuaDocLexerState::Init);
7676
}
7777
}
7878

0 commit comments

Comments
 (0)