Skip to content

Conversation

@utubo
Copy link

@utubo utubo commented Nov 13, 2025

I implemented a def parser to ensure that return statements inside a def do not trigger E133. Additionally, since CI failed on the latest Ubuntu, test.yaml has been updated.

Changes

  • vimlparser.vim

    • Prevent E133 :return not inside a function
    • Check these errors in def
      • E126: Missing :enddef
      • E193: :enddef not inside a def
      • E1003: Missing return value
      • E1263: Cannot use name with # in Vim9 script, use export instead
      • E1267: Function name must start with a capital: %s
      • E1268: Cannot use s: in Vim9 script (def name)
      • E1069: White space required after ':' (type of arguments or return type of def)
      • E1069: White space required after ',' (after arguments)
      • E1077: Missing argument type for %s
      • E1096: Returning a value in a function without a return type
      • E1126: Cannot use :let in Vim9 script
      • E1263: Cannot use name with # in Vim9 script, use export instead
      • E1267: Function name must start with a capital: %s
    • fix some typos.
  • jscompiler.vim

    • Implements slice().
    • Sets undefined to a variable instead of deleting it
  • pycompiler.vim

    • Implements slice().
  • test.yaml

  • Not addressed in this PR (due to complexity)

    • Strict type checking
    • lambda
    • E477: No ! allowed e.g.) def! Foo()

@utubo utubo marked this pull request as ready for review November 15, 2025 08:22
@mattn
Copy link
Member

mattn commented Jan 17, 2026

すみません。これって vim9 パーサを書いたという事でしょうか?

@utubo
Copy link
Author

utubo commented Jan 17, 2026

はい、とはいえVim9 script全部は無理なのでdef周りだけ少し書いてみました
Edit
「はい」は言いすぎました🙇本当にdef周りの解析だけです
ファイル先頭に書くvim9scriptlet無しでの変数への再代入とか基本的なこともやってません!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants