Skip to content

Instantly share code, notes, and snippets.

View alecthomas's full-sized avatar
😀

Alec Thomas alecthomas

😀
View GitHub Profile
@alecthomas
alecthomas / participle.go
Created October 15, 2018 01:59
Participle
package main
import (
"fmt"
"github.com/alecthomas/participle"
"github.com/alecthomas/repr"
)
type CLI struct {
Currently, it works.
```
➤ echo 'field2; field1; @f3 = foo(1,2);' | go run main.go
&main.FieldExprs{
Exprs: []*main.FieldExpr{
&main.FieldExpr{
Field: &"field2",
},
&main.FieldExpr{
#include <iostream>
#include <string>
#include <vector>
#include <entityx/entityx.h>
struct TestComponent : entityx::Component<TestComponent> {
explicit TestComponent(std::string _name = "test") {
name = _name;
}