Skip to content

Create VimlParser vital-module #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ COMPILED_FILES:=js/vimlparser.js py/vimlparser.py

all: $(COMPILED_FILES)

js/vimlparser.js: autoload/vimlparser.vim js/jscompiler.vim js/vimlfunc.js
js/vimlparser.js: autoload/vital/__vimlparser__/VimLParser.vim js/jscompiler.vim js/vimlfunc.js
scripts/jscompile.sh $< $@

py/vimlparser.py: autoload/vimlparser.vim py/pycompiler.vim py/vimlfunc.py
py/vimlparser.py: autoload/vital/__vimlparser__/VimLParser.vim py/pycompiler.vim py/vimlfunc.py
scripts/pycompile.sh $< $@

clean_compiled:
Expand Down
2 changes: 1 addition & 1 deletion README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This parser provide same feature for following languages.

* Vim script
* Python
* Javascript
* JavaScript

## Example

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the L24 below updated like this?

before:

let s:vimlparser = vimlparser#import()

after:

let s:V = vital#yourpluginname#new()
let s:vimlparser = s:V.import('VimLParser')

with vitalize

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for writing vital API instead of autoload API.

And your "after" code should be:

let s:vimlparser = vital#yourpluginname#import('VimLParser').import()

According to https://github.com/vim-jp/vim-vimlparser/pull/74/files#diff-ec29e185fa61087ecf991ff8811a8acaR6

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the first place, current example code is wrong...

-let r = s:StringReader.new(code)
-let p = s:VimLParser.new()
-let c = s:Compiler.new()
+let r = s:vimlparser.StringReader.new(code)
+let p = s:vimlparser.VimLParser.new()
+let c = s:vimlparser.Compiler.new()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍣

Expand Down
Loading