Skip to content

Instantly share code, notes, and snippets.

View njoyard's full-sized avatar

Nicolas Joyard njoyard

View GitHub Profile
@jakubkulhan
jakubkulhan / indent.pegjs
Created July 28, 2012 10:42
Python style indentation parser in PEG.js
// do not use result cache, nor line and column tracking
{ var indentStack = [], indent = ""; }
start
= INDENT? lines:( blank / line )*
{ return lines; }
line
= SAMEDENT line:(!EOL c:. { return c; })+ EOL?
import graphene
from graphene import relay
from graphene_sqlalchemy import SQLAlchemyObjectType, SQLAlchemyConnectionField
class Employee(SQLAlchemyObjectType):
class Meta:
model = EmployeeModel
interfaces = (relay.Node, )