vlang parser in zig
Go to file
Luna 779ff33f8f update readme 2019-08-26 21:57:01 -03:00
examples update readme 2019-08-26 21:57:01 -03:00
src split access modifier parsing into own func 2019-08-26 21:43:58 -03:00
.gitignore initial commit 2019-06-03 21:29:53 -03:00
LICENSE add LICENSE 2019-06-03 21:31:08 -03:00
README.md update readme 2019-08-26 21:57:01 -03:00
build.zig build.zig: s/spoodle/vig 2019-08-26 13:39:00 -03:00

README.md

vig

a v parser in zig, also a shitpost taken too far

(will likely be done as a full compiler, who knows, leave a like and subscribe for more epic adventures)

why

  • because i want to learn parsers and what best to do it with a language i'm negatively charged towards
  • theres an ast now it looks pretty
  • i finally understand recursive descent parsers

variations

  • for is split between for and loop because my fucking god i cant stand having four different variations of for to parse.

  • struct initialization is with Struct.{}, not Struct{}, to remove parsing ambiguities (if a {} and a{}, v solves that with case, e.g structs Must Be Properly Titled and i can't bother with that)

  • function parameters must have a type always

  • ifs are always statements, not expressions (can't use if as an r-value)

  • no ++, --

  • no match

  • no embedded structs

todo

  • +=, -=, and the rest of the gang
  • no for yet
  • no map yet
  • no in yet (probably will be dropped)
  • no arrays yet
  • do we really want a type system
  • do we really want to output c
  • do we really want to output llvm
  • do we really want to output x86

how