You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Refactor constant suffix parsing in a shader
This commit is contained in:
@@ -57,6 +57,7 @@ public:
|
||||
TK_FALSE,
|
||||
TK_FLOAT_CONSTANT,
|
||||
TK_INT_CONSTANT,
|
||||
TK_UINT_CONSTANT,
|
||||
TK_TYPE_VOID,
|
||||
TK_TYPE_BOOL,
|
||||
TK_TYPE_BVEC2,
|
||||
@@ -756,6 +757,9 @@ public:
|
||||
StringName text;
|
||||
double constant;
|
||||
uint16_t line;
|
||||
bool is_integer_constant() const {
|
||||
return type == TK_INT_CONSTANT || type == TK_UINT_CONSTANT;
|
||||
}
|
||||
};
|
||||
|
||||
static String get_operator_text(Operator p_op);
|
||||
@@ -981,6 +985,8 @@ private:
|
||||
static const BuiltinFuncOutArgs builtin_func_out_args[];
|
||||
static const BuiltinFuncConstArgs builtin_func_const_args[];
|
||||
|
||||
static bool is_const_suffix_lut_initialized;
|
||||
|
||||
Error _validate_datatype(DataType p_type);
|
||||
bool _compare_datatypes(DataType p_datatype_a, String p_datatype_name_a, int p_array_size_a, DataType p_datatype_b, String p_datatype_name_b, int p_array_size_b);
|
||||
bool _compare_datatypes_in_nodes(Node *a, Node *b);
|
||||
|
||||
Reference in New Issue
Block a user