Skip to content

Instantly share code, notes, and snippets.

View ceymard's full-sized avatar

Christophe Eymard ceymard

View GitHub Profile
// You need to `npm install ref ffi` for the following code to run.
// What it does basically is get the foreground window in windows and fetch its
// title and the path of the .exe that launched it.
var ref = require('ref');
var ffi = require('ffi');
var stringPtr = ref.refType('string');
var voidPtr = ref.refType('void');
var intPtr = ref.refType('int');
@ceymard
ceymard / parser.zig
Created October 18, 2019 10:25
zig parsing ideas
pub fn assertGrammarRule(comptime T: type) void {
}
pub fn ZeroOrMore(comptime T: type) type {
assertGrammarRule(T);
}
pub fn Peek(comptime T: type) type {