diff --git a/Akku.manifest b/Akku.manifest index 9c9e459..bb390a7 100644 --- a/Akku.manifest +++ b/Akku.manifest @@ -1,7 +1,7 @@ #!r6rs ; -*- mode: scheme; coding: utf-8 -*- (import (akku format manifest)) -(akku-package ("scheme-langserver" "1.2.0") +(akku-package ("scheme-langserver" "1.2.1") (synopsis "This package is a language server protocol implementation helping scheme programming.") (authors "WANG Zheng") diff --git a/analysis/identifier/rules/library-export.sls b/analysis/identifier/rules/library-export.sls index 6969ec9..134191b 100644 --- a/analysis/identifier/rules/library-export.sls +++ b/analysis/identifier/rules/library-export.sls @@ -49,7 +49,7 @@ (let* ([ann (index-node-datum/annotations index-node)] [expression (annotation-stripped ann)]) (match expression - [('rename (internal-names external-names) **1) + [('rename ((? symbol? internal-names) (? symbol? external-names)) **1) (fold-left (lambda (result current-item) (let* ([current-children (index-node-children current-item)] @@ -81,7 +81,7 @@ `(,@result ,external-index-node))) '() (cdr (index-node-children index-node)))] - [identifier + [(? symbol? identifier) (let* ([references (find-available-references-for document index-node identifier)] [reference-count (length references)]) (index-node-references-export-to-other-node-set! diff --git a/analysis/identifier/rules/library-import.sls b/analysis/identifier/rules/library-import.sls index 6a21d9a..77f7e5d 100644 --- a/analysis/identifier/rules/library-import.sls +++ b/analysis/identifier/rules/library-import.sls @@ -133,7 +133,7 @@ (lambda (reference) (not (equal? current-identifier (identifier-reference-identifier reference)))) imported-references)))))] - [('except (library-identifier **1) identifier **1) + [('except (library-identifier **1) (? symbol? identifier) **1) (let ([tmp (filter (lambda (reference) @@ -177,7 +177,7 @@ (lambda (reference) (not (equal? current-identifier (identifier-reference-identifier reference)))) imported-references)))))] - [('prefix (library-identifier **1) prefix-id) + [('prefix (library-identifier **1) (? symbol? prefix-id)) (let* ([imported-references (import-references root-library-node library-identifier)] [prefixed-references (map @@ -194,7 +194,7 @@ imported-references)]) ;;todo: add something to export-to-other-node for current-index-node? (append-references-into-ordered-references-for document grand-parent-index-node prefixed-references))] - [('rename (library-identifier **1) (external-name internal-name) **1 ) + [('rename (library-identifier **1) ((? symbol? external-name) (? symbol? internal-name)) **1 ) (let loop ([importion-nodes (cddr (index-node-children index-node))] [external-names external-name] [internal-names internal-name] @@ -250,7 +250,7 @@ (lambda (reference) (not (equal? current-external-name (identifier-reference-identifier reference)))) imported-references)))))] - [('alias (library-identifier **1) (external-name internal-name) **1 ) + [('alias (library-identifier **1) ((? symbol? external-name) (? symbol? internal-name)) **1 ) (let loop ([importion-nodes (cddr (index-node-children index-node))] [external-names external-name] [internal-names internal-name] @@ -375,7 +375,7 @@ (let* ([ann (index-node-datum/annotations index-node)] [expression (annotation-stripped ann)]) (match expression - [('rename (internal-names external-names) **1) + [('rename ((? symbol? internal-names) (? symbol? external-names)) **1) (let loop ([exportion-nodes (cdr (index-node-children index-node))] [result '()]) (if (null? exportion-nodes) @@ -383,6 +383,6 @@ (loop (cdr exportion-nodes) (append result (index-node-references-export-to-other-node (cadr (index-node-children (car exportion-nodes))))))))] - [identifier (index-node-references-export-to-other-node index-node)] + [(? symbol? identifier) (index-node-references-export-to-other-node index-node)] [else '()]))) ) \ No newline at end of file