File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change 1
- # Vim Script Parsers
1
+ # VimL Parsers
2
2
3
3
[ ![ Build Status] ( https://travis-ci.org/vim-jp/vim-vimlparser.svg?branch=master )] ( https://travis-ci.org/vim-jp/vim-vimlparser ) [ ![ codecov] ( https://codecov.io/gh/vim-jp/vim-vimlparser/branch/master/graph/badge.svg )] ( https://codecov.io/gh/vim-jp/vim-vimlparser )
4
4
5
+ This is Vim script (a.k.a. VimL) parsers.
5
6
6
- TODO: write something.
7
+ ## Features
8
+
9
+ The parser to make AST (Abstract Syntax Tree)
10
+
11
+ ## Supported languages
12
+
13
+ This parser provide same feature for following languages.
14
+
15
+ * Vim script
16
+ * Python
17
+ * Javascript
18
+
19
+ ## Example
20
+
21
+ All of interfaces are provided from vimlparser module. VimLParser parse into AST using StringReader, and Compiler to compile nodes.
22
+
23
+ ``` vim
24
+ let s:vimlparser = vimlparser#import()
25
+ let code = [
26
+ \ 'let s:message = printf("hello %d", 1+(2*3))'
27
+ \]
28
+ let r = s:StringReader.new(code)
29
+ let p = s:VimLParser.new()
30
+ let c = s:Compiler.new()
31
+ echo join(c.compile(p.parse(r)), "\n")
32
+ ```
33
+
34
+ This above code output following.
35
+
36
+ ```
37
+ (let = s:message (printf "hello %d" (+ 1 (* 2 3))))
38
+ ```
You can’t perform that action at this time.
0 commit comments