Skip to content

Commit f40e8aa

Browse files
committed
docs(lib.luakittens): add info about parser rewrite
1 parent 3726f8a commit f40e8aa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lua/cpp-tools/lib/luakittens/parser.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ local M = {}
44
-- Types
55
--------------------------------------------------
66

7+
--[[
8+
9+
This is a very basic implementation, but I will rewrite the parsing to use a handwritten parser
10+
because the lpeg re implementation isn't sufficient and doesn't allow for any remotely useful diagnostics.
11+
12+
The current implementation lacks the ability to express alternative types in complex types.
13+
The blocker is that with this lpeg parser it's impossible to not make things like `[]string|number` ambiguous
14+
(this gets parsed as `[](string|number)`).
15+
16+
]]
17+
718
---@alias cpp-tools.luakittens.Kitten string
819

920
---@package

0 commit comments

Comments
 (0)