Skip to content

Commit

Permalink
feat(shader-ast): add isBool() helper, update gensym() to use base36 ids
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jun 24, 2019
1 parent e3498b2 commit 2b23b83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/shader-ast/src/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ import {

let symID = 0;

export const gensym = () => `_sym${symID++}`;
export const gensym = () => `_s${(symID++).toString(36)}`;

export const isBool = (t: Term<any>) => t.type === "bool";

export const isFloat = (t: Term<any>) => t.type === "float";

Expand Down

0 comments on commit 2b23b83

Please sign in to comment.