aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/lex/LexUtil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/lex/LexUtil.h')
-rw-r--r--src/sksl/lex/LexUtil.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sksl/lex/LexUtil.h b/src/sksl/lex/LexUtil.h
new file mode 100644
index 0000000000..d2c462b0ed
--- /dev/null
+++ b/src/sksl/lex/LexUtil.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright 2017 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SKSL_LEXUTIL
+#define SKSL_LEXUTIL
+
+#define ABORT(...) (fprintf(stderr, __VA_ARGS__), abort())
+#define ASSERT(x) (void)((x) || (ABORT("failed assert(%s): %s:%d\n", #x, __FILE__, __LINE__), 0))
+
+#endif