blob: 338b864646cdb66f94b23defccd5c404c52c5a3a [file] [log] [blame]
Ethan Nicholasca82a922017-09-07 09:39:50 -04001/*
2 * Copyright 2017 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SKSL_LEXUTIL
9#define SKSL_LEXUTIL
10
Ethan Nicholas8d7f4ae2017-09-07 11:07:42 -040011#include <cstdlib>
12
Ethan Nicholas906126e2017-09-19 14:38:40 -040013#define INVALID -1
14
Ethan Nicholasca82a922017-09-07 09:39:50 -040015#define ABORT(...) (fprintf(stderr, __VA_ARGS__), abort())
Ethan Nicholasd9d33c32018-06-12 11:05:59 -040016#define SkASSERT(x) (void)((x) || (ABORT("failed SkASSERT(%s): %s:%d\n", #x, __FILE__, __LINE__), 0))
Ethan Nicholasca82a922017-09-07 09:39:50 -040017
18#endif