From 8e00142b18d06dfb93f3ee34aa7d28b7618b5393 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 14 Dec 2014 17:24:51 -0400 Subject: Added module imports. --- src/lang/parser.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lang/parser.clj') diff --git a/src/lang/parser.clj b/src/lang/parser.clj index f756a8b14..3149cf5d4 100644 --- a/src/lang/parser.clj +++ b/src/lang/parser.clj @@ -102,6 +102,10 @@ [::&lexer/list ([[::&lexer/ident "import"] [::&lexer/ident ?class]] :seq)] (return [::import ?class])) +(defparser ^:private parse-require + [::&lexer/list ([[::&lexer/ident "require"] [::&lexer/string ?file] [::&lexer/ident "as"] [::&lexer/ident ?alias]] :seq)] + (return [::require ?file ?alias])) + (defparser ^:private parse-defclass [::&lexer/list ([[::&lexer/ident "defclass"] [::&lexer/ident ?name] [::&lexer/tuple ?fields]] :seq)] (let [fields (for [field ?fields] @@ -200,9 +204,10 @@ parse-static-access parse-dynamic-access parse-ann-class - parse-import parse-defclass parse-definterface + parse-import + parse-require parse-fn-call])) ;; [Interface] -- cgit v1.2.3