Skip to content

Instantly share code, notes, and snippets.

View hildjj's full-sized avatar

Joe Hildebrand hildjj

View GitHub Profile
@hildjj
hildjj / tagged-vector-adder.pegjs
Last active December 3, 2023 20:08 — forked from frostburn/tagged-vector-adder.pegjs
Peggy proposition: Tagged template parser with auto-vectorization of template arguments
import peg from "peggy-tag";
const PLACEHOLDER = "{{{ARG}}}";
const parse = peg`
{{
function add(left, right) {
if (typeof left === 'number') {
if (typeof right === 'number') {
return left + right;