cdb / actions-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Actions Parser

This is a learning project for me to learn a bit about lexing, parsing, and evaluating code. It's focused on the GitHub Actions context and expression syntax.

I was inspired to work specifically on this while I was digging in and learning about the nektos/act project, and specifically seeing this issue in there about how the syntax is not quite valid javascript. nektos/act uses the Otto JS virtual machine to evaluate these expressions, so was failing (until an awesome workaround was submitted at least).

Under the hood I didn't want to just fall back on a JS VM, and also didn't want to go right to direct byte-by-byte lexing and parsing, so I built on top of the Participle package as it is both well used (lots of stars, etc), pure Go, and also had a lot of useful examples of different languages.

Shoulders of Giants

Nothing is done in a vacuum, especially stuff that I think of a "deep computer science-y". I read a bunch of blog posts and perused a many existing projects in order to put this together. Ideas came from all over:

About

License:MIT License


Languages

Language:Go 100.0%