skia2/include/private/SkSLIRNode.h
Brian Osman cc91452f0a Revert "Renamed SkSL "offset" to "line""
This reverts commit 58d47fa1ec.

Reason for revert: Tree broken

Original change's description:
> Renamed SkSL "offset" to "line"
>
> https://skia-review.googlesource.com/c/skia/+/451419 changed the meaning
> of "offset" throughout SkSL, so that it was actually tracking line
> numbers rather than offsets (and thus had a misleading name). This
> completes the transition by renaming all of the now-misnamed "offset"
> fields, parameters, and variables to "line'.
>
> Bug: skia:12459
> Change-Id: I394e6441f6ddfaad6d4098352ba9b1bfeaf273be
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/450644
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

Bug: skia:12459
Change-Id: Idcec3b65cb81d51c8b860c4388578700030b40a9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/452718
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-24 18:59:18 +00:00

66 lines
1.4 KiB
C++

/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SKSL_IRNODE
#define SKSL_IRNODE
#include "include/private/SkSLString.h"
#include "include/private/SkTArray.h"
#include "src/sksl/SkSLASTNode.h"
#include "src/sksl/SkSLLexer.h"
#include "src/sksl/SkSLModifiersPool.h"
#include "src/sksl/SkSLPool.h"
#include <algorithm>
#include <atomic>
#include <unordered_set>
#include <vector>
namespace SkSL {
class Expression;
class FunctionDeclaration;
class FunctionDefinition;
class Statement;
class Symbol;
class SymbolTable;
class Type;
class Variable;
class VariableReference;
enum class VariableRefKind : int8_t;
enum class VariableStorage : int8_t;
/**
* Represents a node in the intermediate representation (IR) tree. The IR is a fully-resolved
* version of the program (all types determined, everything validated), ready for code generation.
*/
class IRNode : public Poolable {
public:
virtual ~IRNode() {}
virtual String description() const = 0;
// No copy construction or assignment
IRNode(const IRNode&) = delete;
IRNode& operator=(const IRNode&) = delete;
// character offset of this element within the program being compiled, for error reporting
// purposes
int fOffset;
protected:
IRNode(int offset, int kind)
: fOffset(offset)
, fKind(kind) {}
int fKind;
};
} // namespace SkSL
#endif