|
Blender V5.3
|
Inherits PrattParser< ExpressionTypeParser, ExpressionResult, ast::Node >.
Public Types | |
| using | Base = PrattParser<ExpressionTypeParser, ExpressionResult, ast::Node> |
| using | ErrorType = Base::ErrorType |
| using | BindingPower = Base::BindingPower |
| Public Types inherited from PrattParser< ExpressionTypeParser, ExpressionResult, ast::Node > | |
| enum | ErrorType |
Type resolution parser. Will evaluate each operand type and return the type of the expression result.
Definition at line 21 of file type_checker.cc.
| using bsl::ExpressionTypeParser::Base = PrattParser<ExpressionTypeParser, ExpressionResult, ast::Node> |
Definition at line 23 of file type_checker.cc.
| using bsl::ExpressionTypeParser::BindingPower = Base::BindingPower |
Definition at line 25 of file type_checker.cc.
Definition at line 24 of file type_checker.cc.
|
inline |
Definition at line 38 of file type_checker.cc.
Referenced by bsl::SymbolTable::expr_type_analysis().
|
inline |
Definition at line 604 of file type_checker.cc.
References lexit::And, bsl::anyGreaterThanEqual(), bsl::anyLessThan(), bsl::ExpressionResult::array_dim, bsl::ArrayTypeOperand, blender::gpu::shader::metadata::assert, bsl::constexpr_to_string(), bsl::ConstexprDivisionByZero, bsl::ConstexprShiftNegative, bsl::ConstexprShiftTooLarge, bsl::contains_zero(), lexit::Divide, lexit::Equal, error(), PrattParser< ExpressionTypeParser, ExpressionResult, ast::Node >::expr(), bsl::ExpressionResult::flags, blender::gpu::shader::parser::ast::Node::front(), lexit::GEqual, lexit::GThan, bsl::Symbol::identifier, bsl::builtin::Invalid, bsl::InvalidBinaryOperands, bsl::IsConstexpr, lexit::LEqual, lexit::LogicalAnd, lexit::LogicalOr, lexit::LShift, lexit::LThan, lexit::Minus, lexit::Modulo, lexit::Multiply, lexit::NotEqual, lexit::Or, lexit::Plus, lexit::RShift, bsl::ExpressionResult::type, lexit::Token::type(), bsl::ExpressionResult::value, and lexit::Xor.
|
inline |
Definition at line 597 of file type_checker.cc.
References PrattParser< ExpressionTypeParser, ExpressionResult, ast::Node >::expr().
|
inline |
Definition at line 773 of file type_checker.cc.
References blender::gpu::shader::parser::ast::Node::next().
|
inline |
Definition at line 749 of file type_checker.cc.
References error(), bsl::ExpectedColon, bsl::ExpectedParenthesis, bsl::InvalidExprTypeChecker, and bsl::OperatorTokenInvalid.
Referenced by binary(), error(), eval(), function_call(), identifier(), member(), number_literal(), prefix(), subscript(), suffix(), and ternary().
|
inline |
Definition at line 50 of file type_checker.cc.
References consume(), error(), PrattParser< ExpressionTypeParser, ExpressionResult, ast::Node >::expr(), lexit::Invalid, bsl::ParserTrailingInput, and peek().
|
inline |
Definition at line 439 of file type_checker.cc.
References error(), bsl::FunctionCallNotAllowedInReferenceDefinition, bsl::Symbol::identifier, bsl::OperatorCalledIsNotFunction, and bsl::ExpressionResult::type.
|
inline |
CRTP Implementation
Definition at line 64 of file type_checker.cc.
References bsl::ExpressionResult::array_dim, bsl::ConstexprValue::BOOL1, bsl::ConstexprValue::BOOL2, bsl::ConstexprValue::BOOL3, bsl::ConstexprValue::BOOL4, blender::gpu::shader::parser::ast::Node::child_count(), blender::gpu::shader::parser::ast::Node::child_first(), bsl::ConstexprValue::comp_cast(), bsl::SymbolClass::comp_len, bsl::ConstexprValue::ConstexprValue(), error(), bsl::ExpectedOneTypename, bsl::ConstexprValue::FLOAT1, bsl::ConstexprValue::FLOAT2, bsl::ConstexprValue::FLOAT3, bsl::ConstexprValue::FLOAT4, bsl::FunctionCallNotAllowedInReferenceDefinition, blender::gpu::shader::parser::ast::Constructor::identifier(), blender::gpu::shader::parser::ast::FuncCall::identifier(), blender::gpu::shader::parser::ast::LocalVar::identifier(), bsl::Symbol::identifier, bsl::ConstexprValue::INT1, bsl::ConstexprValue::INT2, bsl::ConstexprValue::INT3, bsl::ConstexprValue::INT4, bsl::InvalidExprTypeChecker, bsl::ExpressionResult::is_constexpr(), bsl::SymbolFunction::is_constexpr, bsl::SymbolFunction::is_error, blender::gpu::shader::parser::ast::Node::is_valid(), bsl::SymbolScope::lookup_class(), bsl::SymbolScope::lookup_variable(), blender::gpu::shader::parser::ast::FuncCall::parameters(), bsl::SymbolFunction::return_type, blender::gpu::shader::parser::ast::FuncParamList::splat_1(), blender::gpu::shader::parser::ast::FuncParamList::splat_2(), blender::gpu::shader::parser::ast::FuncParamList::splat_4(), blender::gpu::shader::parser::ast::Node::str(), blender::gpu::shader::parser::ast::Node::type(), bsl::ExpressionResult::type, bsl::ConstexprValue::UINT1, bsl::ConstexprValue::UINT2, bsl::ConstexprValue::UINT3, bsl::ConstexprValue::UINT4, bsl::UnknownMember, bsl::UnknownVariable, and bsl::ExpressionResult::value.
|
inline |
Definition at line 406 of file type_checker.cc.
References consume(), error(), bsl::FunctionCallNotAllowedInReferenceDefinition, blender::gpu::shader::parser::ast::FuncCall::identifier(), blender::gpu::shader::parser::ast::LocalVar::identifier(), bsl::InvalidExprTypeChecker, blender::gpu::shader::parser::ast::FuncCall::parameters(), blender::gpu::shader::parser::ast::Node::str(), blender::gpu::shader::parser::ast::Node::type(), bsl::ExpressionResult::type, and bsl::UnknownMember.
|
inline |
Definition at line 365 of file type_checker.cc.
References bsl::ConstexprValue::ConstexprValue(), error(), bsl::InvalidNumberLiteral, and blender::gpu::shader::parser::ast::Node::str().
|
inline |
Definition at line 401 of file type_checker.cc.
References PrattParser< ExpressionTypeParser, ExpressionResult, ast::Node >::expr().
|
inline |
|
inline |
Definition at line 487 of file type_checker.cc.
References bsl::ExpressionResult::array_dim, bsl::ArrayTypeOperand, blender::gpu::shader::metadata::assert, lexit::BitwiseNot, lexit::Decrement, error(), PrattParser< ExpressionTypeParser, ExpressionResult, ast::Node >::expr(), bsl::ExpressionResult::flags, blender::gpu::shader::parser::ast::Node::front(), bsl::Symbol::identifier, lexit::Increment, bsl::builtin::Invalid, bsl::InvalidUnaryArgumentType, bsl::IsConstexpr, lexit::Minus, lexit::Not, lexit::Plus, bsl::ReferenceCannotBindSideEffect, blender::gpu::shader::parser::ast::Node::str(), bsl::ExpressionResult::type, lexit::Token::type(), and bsl::ExpressionResult::value.
|
inline |
Definition at line 396 of file type_checker.cc.
|
inline |
Definition at line 448 of file type_checker.cc.
References bsl::ExpressionResult::array_dim, error(), bsl::ExpressionResult::flags, bsl::InvalidSubscript, blender::gpu::shader::parser::ast::Node::is_valid(), bsl::IsConstant, bsl::SymbolClass::operator_subscript, bsl::Promotion, bsl::ReferenceCannotBindNonConstSubscript, bsl::SymbolFunction::return_type, subscript_parameter(), bsl::SubscriptNotInt, and bsl::ExpressionResult::type.
|
inline |
Definition at line 482 of file type_checker.cc.
References blender::gpu::shader::parser::ast::Subscript::expr().
Referenced by subscript().
|
inline |
Definition at line 547 of file type_checker.cc.
References bsl::ExpressionResult::array_dim, bsl::ArrayTypeOperand, blender::gpu::shader::metadata::assert, lexit::Decrement, error(), bsl::ExpressionResult::flags, blender::gpu::shader::parser::ast::Node::front(), bsl::Symbol::identifier, lexit::Increment, bsl::builtin::Invalid, bsl::InvalidUnaryArgumentType, bsl::IsConstexpr, bsl::ReferenceCannotBindSideEffect, bsl::ExpressionResult::type, lexit::Token::type(), and bsl::ExpressionResult::value.
|
inline |
Definition at line 721 of file type_checker.cc.
References lexit::Colon, bsl::ConstexprValue::comp_as(), consume(), error(), PrattParser< ExpressionTypeParser, ExpressionResult, ast::Node >::expr(), bsl::ExpressionResult::flags, bsl::IsConstexpr, bsl::OperatorInvalidTernary, bsl::Symbol::original, bsl::ExpressionResult::type, bsl::TypeNotConvertibleToBool, and bsl::ExpressionResult::value.
Definition at line 780 of file type_checker.cc.
References blender::gpu::shader::parser::ast::Node::front(), lexit::Invalid, blender::gpu::shader::parser::ast::Node::type(), and lexit::Word.