blob: f3d250ad8daf4a246cceba17e61ed2a85db91a94 [file] [log] [blame]
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*****************************************************************************************
******************** This file was generated by sksllex. Do not edit. *******************
*****************************************************************************************/
#ifndef SKSL_LayoutLexer
#define SKSL_LayoutLexer
#include <cstddef>
#include <cstdint>
namespace SkSL {
struct LayoutToken {
enum Kind {
#undef END_OF_FILE
END_OF_FILE,
#undef LOCATION
LOCATION,
#undef OFFSET
OFFSET,
#undef BINDING
BINDING,
#undef INDEX
INDEX,
#undef SET
SET,
#undef BUILTIN
BUILTIN,
#undef INPUT_ATTACHMENT_INDEX
INPUT_ATTACHMENT_INDEX,
#undef ORIGIN_UPPER_LEFT
ORIGIN_UPPER_LEFT,
#undef OVERRIDE_COVERAGE
OVERRIDE_COVERAGE,
#undef BLEND_SUPPORT_ALL_EQUATIONS
BLEND_SUPPORT_ALL_EQUATIONS,
#undef PUSH_CONSTANT
PUSH_CONSTANT,
#undef POINTS
POINTS,
#undef LINES
LINES,
#undef LINE_STRIP
LINE_STRIP,
#undef LINES_ADJACENCY
LINES_ADJACENCY,
#undef TRIANGLES
TRIANGLES,
#undef TRIANGLE_STRIP
TRIANGLE_STRIP,
#undef TRIANGLES_ADJACENCY
TRIANGLES_ADJACENCY,
#undef MAX_VERTICES
MAX_VERTICES,
#undef INVOCATIONS
INVOCATIONS,
#undef WHEN
WHEN,
#undef KEY
KEY,
#undef INVALID
INVALID,
};
LayoutToken() : fKind(Kind::INVALID), fOffset(-1), fLength(-1) {}
LayoutToken(Kind kind, int offset, int length)
: fKind(kind), fOffset(offset), fLength(length) {}
Kind fKind;
int fOffset;
int fLength;
};
class LayoutLexer {
public:
void start(const char* text, size_t length) {
fText = text;
fLength = length;
fOffset = 0;
}
LayoutToken next();
private:
const char* fText;
int fLength;
int fOffset;
};
} // namespace
#endif