Lines Matching refs:fOffset
179 return std::unique_ptr<Extension>(new Extension(extension.fOffset, extension.fName)); in convertExtension()
200 return std::unique_ptr<Block>(new Block(statement.fOffset, in convertStatement()
241 return std::unique_ptr<Block>(new Block(block.fOffset, std::move(statements), fSymbolTable)); in convertBlock()
263 fErrors.error(decl.fOffset, "'in' variables may not have matrix type"); in convertVarDeclarations()
269 fErrors.error(decl.fOffset, in convertVarDeclarations()
285 fErrors.error(size->fOffset, "array size must be positive"); in convertVarDeclarations()
301 auto var = std::unique_ptr<Variable>(new Variable(decl.fOffset, decl.fModifiers, in convertVarDeclarations()
336 return std::unique_ptr<VarDeclarations>(new VarDeclarations(decl.fOffset, in convertVarDeclarations()
390 return std::unique_ptr<Statement>(new Block(s.fOffset, std::move(empty), in convertIf()
394 return std::unique_ptr<Statement>(new IfStatement(s.fOffset, s.fIsStatic, std::move(test), in convertIf()
427 return std::unique_ptr<Statement>(new ForStatement(f.fOffset, std::move(initializer), in convertFor()
443 return std::unique_ptr<Statement>(new WhileStatement(w.fOffset, std::move(test), in convertWhile()
458 return std::unique_ptr<Statement>(new DoStatement(d.fOffset, std::move(statement), in convertDo()
489 fErrors.error(caseValue->fOffset, "case value must be a constant"); in convertSwitch()
495 fErrors.error(caseValue->fOffset, "duplicate case value"); in convertSwitch()
507 cases.emplace_back(new SwitchCase(c->fOffset, std::move(caseValue), in convertSwitch()
510 return std::unique_ptr<Statement>(new SwitchStatement(s.fOffset, s.fIsStatic, in convertSwitch()
537 fErrors.error(result->fOffset, "may not return a value from a void function"); in convertReturn()
547 fErrors.error(r.fOffset, "expected function to return '" + in convertReturn()
550 return std::unique_ptr<Statement>(new ReturnStatement(r.fOffset)); in convertReturn()
556 return std::unique_ptr<Statement>(new BreakStatement(b.fOffset)); in convertBreak()
558 fErrors.error(b.fOffset, "break statement must be inside a loop or switch"); in convertBreak()
565 return std::unique_ptr<Statement>(new ContinueStatement(c.fOffset)); in convertContinue()
567 fErrors.error(c.fOffset, "continue statement must be inside a loop"); in convertContinue()
573 return std::unique_ptr<Statement>(new DiscardStatement(d.fOffset)); in convertDiscard()
686 Variable* var = new Variable(param->fOffset, param->fModifiers, name, *type, in convertFunction()
703 fErrors.error(f.fOffset, "pipeline stage 'main' must be declared main(int, " in convertFunction()
708 fErrors.error(f.fOffset, "shader 'main' must have zero parameters"); in convertFunction()
725 fErrors.error(f.fOffset, "symbol '" + f.fName + "' was already defined"); in convertFunction()
740 FunctionDeclaration newDecl(f.fOffset, f.fModifiers, f.fName, parameters, in convertFunction()
742 fErrors.error(f.fOffset, "functions '" + newDecl.description() + in convertFunction()
750 fErrors.error(f.fOffset, "modifiers on parameter " + in convertFunction()
758 fErrors.error(f.fOffset, "duplicate definition of " + in convertFunction()
768 auto newDecl = std::unique_ptr<FunctionDeclaration>(new FunctionDeclaration(f.fOffset, in convertFunction()
812 new FunctionDefinition(f.fOffset, *decl, std::move(body)))); in convertFunction()
833 fErrors.error(decl->fOffset, in convertInterfaceBlock()
845 fErrors.error(decl->fOffset, in convertInterfaceBlock()
853 fErrors.error(decl->fOffset, in convertInterfaceBlock()
863 Type* type = new Type(intf.fOffset, intf.fTypeName, fields); in convertInterfaceBlock()
877 fErrors.error(converted->fOffset, "array size must be positive"); in convertInterfaceBlock()
893 Variable* var = new Variable(intf.fOffset, intf.fModifiers, in convertInterfaceBlock()
904 old->add(fields[i].fName, std::unique_ptr<Field>(new Field(intf.fOffset, *var, in convertInterfaceBlock()
908 return std::unique_ptr<InterfaceBlock>(new InterfaceBlock(intf.fOffset, in convertInterfaceBlock()
930 fErrors.error(value.fOffset, "expected a constant int"); in getConstantInt()
938 ASTType enumType(e.fOffset, e.fTypeName, ASTType::kIdentifier_Kind, {}); in convertEnum()
953 value = std::unique_ptr<Expression>(new IntLiteral(fContext, e.fOffset, currentValue)); in convertEnum()
955 auto var = std::unique_ptr<Variable>(new Variable(e.fOffset, modifiers, e.fNames[i], in convertEnum()
962 fProgramElements->push_back(std::unique_ptr<ProgramElement>(new Enum(e.fOffset, e.fTypeName, in convertEnum()
982 fErrors.error(type.fOffset, "unknown type '" + type.fName + "'"); in convertType()
991 return std::unique_ptr<Expression>(new BoolLiteral(fContext, expr.fOffset, in convertExpression()
994 return std::unique_ptr<Expression>(new IntLiteral(fContext, expr.fOffset, in convertExpression()
997 return std::unique_ptr<Expression>(new FloatLiteral(fContext, expr.fOffset, in convertExpression()
1015 fErrors.error(identifier.fOffset, "unknown identifier '" + identifier.fText + "'"); in convertIdentifier()
1024 identifier.fOffset, in convertIdentifier()
1030 identifier.fOffset, in convertIdentifier()
1056 identifier.fOffset, in convertIdentifier()
1062 VariableReference* base = new VariableReference(identifier.fOffset, field->fOwner, in convertIdentifier()
1071 return std::unique_ptr<TypeReference>(new TypeReference(fContext, identifier.fOffset, in convertIdentifier()
1080 return std::unique_ptr<Section>(new Section(s.fOffset, s.fName, s.fArgument, s.fText)); in convertSection()
1097 fErrors.error(expr->fOffset, "expected '" + type.description() + "', but found '" + in coerce()
1305 : std::unique_ptr<Expression>(new BoolLiteral(context, left.fOffset, false)); in short_circuit_boolean()
1308 return leftVal ? std::unique_ptr<Expression>(new BoolLiteral(context, left.fOffset, true)) in short_circuit_boolean()
1348 return std::unique_ptr<Expression>(new BoolLiteral(fContext, left.fOffset, result)); in constantFold()
1350 #define RESULT(t, op) std::unique_ptr<Expression>(new t ## Literal(fContext, left.fOffset, \ in constantFold()
1363 fErrors.error(right.fOffset, "division by zero"); in constantFold()
1369 fErrors.error(right.fOffset, "division by zero"); in constantFold()
1397 fErrors.error(right.fOffset, "division by zero"); in constantFold()
1482 fErrors.error(expression.fOffset, String("type mismatch: '") + in convertBinaryExpression()
1501 result = std::unique_ptr<Expression>(new BinaryExpression(expression.fOffset, in convertBinaryExpression()
1530 fErrors.error(expression.fOffset, "ternary operator result mismatch: '" + in convertTernaryExpression()
1551 return std::unique_ptr<Expression>(new TernaryExpression(expression.fOffset, in convertTernaryExpression()
1811 fErrors.error(expression.fOffset, in convertPrefixExpression()
1818 fErrors.error(expression.fOffset, in convertPrefixExpression()
1823 return std::unique_ptr<Expression>(new IntLiteral(fContext, base->fOffset, in convertPrefixExpression()
1828 return std::unique_ptr<Expression>(new FloatLiteral(fContext, base->fOffset, in convertPrefixExpression()
1834 fErrors.error(expression.fOffset, in convertPrefixExpression()
1843 fErrors.error(expression.fOffset, in convertPrefixExpression()
1852 fErrors.error(expression.fOffset, in convertPrefixExpression()
1858 return std::unique_ptr<Expression>(new BoolLiteral(fContext, base->fOffset, in convertPrefixExpression()
1864 fErrors.error(expression.fOffset, in convertPrefixExpression()
1886 return std::unique_ptr<Expression>(new TypeReference(fContext, base->fOffset, in convertIndex()
1890 fErrors.error(base->fOffset, "array size must be a constant"); in convertIndex()
1896 fErrors.error(base->fOffset, "expected array, but found '" + base->fType.description() + in convertIndex()
1922 fErrors.error(base->fOffset, "type '" + base->fType.description() + "' does not have a " in convertField()
1930 fErrors.error(base->fOffset, "cannot swizzle type '" + base->fType.description() + "'"); in convertSwizzle()
1966 fErrors.error(base->fOffset, String::printf("invalid swizzle component '%c'", in convertSwizzle()
1973 fErrors.error(base->fOffset, "too many components in swizzle mask '" + fields + "'"); in convertSwizzle()
2120 return std::unique_ptr<Expression>(new TypeReference(fContext, base->fOffset, in convertSuffixExpression()
2123 fErrors.error(expression.fOffset, "'[]' must follow a type name"); in convertSuffixExpression()
2131 return convertAppend(expression.fOffset, *rawArguments); in convertSuffixExpression()
2142 return this->call(expression.fOffset, std::move(base), std::move(arguments)); in convertSuffixExpression()
2147 return this->getCap(expression.fOffset, field); in convertSuffixExpression()
2150 return this->getArg(expression.fOffset, field); in convertSuffixExpression()
2153 return this->convertTypeField(base->fOffset, ((TypeReference&) *base).fValue, in convertSuffixExpression()
2163 fErrors.error(base->fOffset, "cannot swizzle value of type '" + in convertSuffixExpression()
2170 fErrors.error(expression.fOffset, in convertSuffixExpression()
2179 fErrors.error(expression.fOffset, in convertSuffixExpression()
2194 fErrors.error(expr.fOffset, "expected '(' to begin function call"); in checkValid()
2197 fErrors.error(expr.fOffset, "expected '(' to begin constructor invocation"); in checkValid()
2201 fErrors.error(expr.fOffset, "invalid expression"); in checkValid()
2224 fErrors.error(expr.fOffset, in setRefKind()
2235 fErrors.error(expr.fOffset, in setRefKind()
2250 fErrors.error(expr.fOffset, "cannot assign to '" + expr.description() + "'"); in setRefKind()