diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2020-11-21 20:13:16 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2020-11-21 20:13:16 +0100 |
| commit | f3189ca2955aa64a5e919379dc3260cb0d564884 (patch) | |
| tree | 00ddcf0283bbf328d8a664caca367a6977e4f444 /src | |
| parent | e6028ef393d5858c68fc9c69a02743b3a6e09bf2 (diff) | |
fixed crashes
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/analysis.odin | 4 | ||||
| -rw-r--r-- | src/server/documents.odin | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 9022e5a..38727dd 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -1668,8 +1668,8 @@ get_document_position_node :: proc(node: ^ast.Node, position_context: ^DocumentP case Expr_Stmt: get_document_position(n.expr, position_context); case Tag_Stmt: - r := cast(^Expr_Stmt)node; - get_document_position(r.expr, position_context); + r := cast(^Tag_Stmt)node; + get_document_position(r.stmt, position_context); case Assign_Stmt: get_document_position(n.lhs, position_context); get_document_position(n.rhs, position_context); diff --git a/src/server/documents.odin b/src/server/documents.odin index b6425d8..05c0c3e 100644 --- a/src/server/documents.odin +++ b/src/server/documents.odin @@ -342,7 +342,7 @@ parse_document :: proc(document: ^Document, config: ^common.Config) -> ([] Parse for imp, index in document.ast.imports { //collection specified - if i := strings.index(imp.fullpath, ":"); i != -1 { + if i := strings.index(imp.fullpath, ":"); i != -1 && i > 1 { //Note(Daniel, assuming absolute path atm, but that will change) |