dawn-cmake/src/ast
Ben Clayton 5bee67fced Add File & Range information to tint::Source
This is the first step in improving the error messages produced while parsing.

The `line` and `column` information of `Source` has been moved to `Source::Location`.

`Source::Range` has been added that contains a `Location` interval - allowing error messages to highlight the full region of the error.

The `File` information provides an optional file path, and pre-splits the content into lines. These lines can be used to print the full line containing an error.

This CL contains a few temporary changes that help split up this work, and to ease integration with Tint.

Bug: tint:282
Change-Id: I7aa501b0a9631f286e8e93fd7396bdbe38175727
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31420
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-10-30 20:44:53 +00:00
..
type [spirv-writer] Emit access control information. 2020-10-29 14:45:02 +00:00
access_control.cc [ast] Unify the access control types. 2020-10-29 13:36:32 +00:00
access_control.h [ast] Unify the access control types. 2020-10-29 13:36:32 +00:00
array_accessor_expression.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
array_accessor_expression.h [transform] Add BufferArrayAccessors transform 2020-09-29 18:40:40 +00:00
array_accessor_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
array_decoration.cc [wgsl-reader] Allow array decorations to have multiple blocks. 2020-10-08 19:34:25 +00:00
array_decoration.h [wgsl-reader] Allow array decorations to have multiple blocks. 2020-10-08 19:34:25 +00:00
assignment_statement.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
assignment_statement.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
assignment_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
binary_expression.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
binary_expression.h Remove right shift arithmetic operand. 2020-06-03 16:11:44 +00:00
binary_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
binding_decoration.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
binding_decoration.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
binding_decoration_test.cc [ast] Add constant_id decoration 2020-09-29 18:07:50 +00:00
bitcast_expression.cc Rename 'as' to 'bitcast' 2020-09-22 22:07:13 +00:00
bitcast_expression.h Rename 'as' to 'bitcast' 2020-09-22 22:07:13 +00:00
bitcast_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
block_statement.cc [ast] Add BlockStatement 2020-07-27 15:25:00 +00:00
block_statement.h Fixup build warnings 2020-07-30 18:18:46 +00:00
block_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
bool_literal.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
bool_literal.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
bool_literal_test.cc Add IntLiteral parent for Sint and Uint literals. 2020-06-02 20:11:54 +00:00
break_statement.cc Remove conditional break/continue. 2020-06-03 16:11:28 +00:00
break_statement.h Remove conditional break/continue. 2020-06-03 16:11:28 +00:00
break_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
builtin.cc [wgsl-reader] Add workgroup_size parsing 2020-09-21 00:37:08 +00:00
builtin.h [wgsl-reader] Add workgroup_size parsing 2020-09-21 00:37:08 +00:00
builtin_decoration.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
builtin_decoration.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
builtin_decoration_test.cc [ast] Add constant_id decoration 2020-09-29 18:07:50 +00:00
call_expression.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
call_expression.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
call_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
call_statement.cc Add a call ast statement. 2020-07-21 13:42:05 +00:00
call_statement.h Add a call ast statement. 2020-07-21 13:42:05 +00:00
call_statement_test.cc Add a call ast statement. 2020-07-21 13:42:05 +00:00
case_statement.cc Remove StatementList. 2020-07-27 15:25:00 +00:00
case_statement.h [transform] Add BufferArrayAccessors transform 2020-09-29 18:40:40 +00:00
case_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
constant_id_decoration.cc [ast] Add constant_id decoration 2020-09-29 18:07:50 +00:00
constant_id_decoration.h [ast] Add constant_id decoration 2020-09-29 18:07:50 +00:00
constant_id_decoration_test.cc [ast] Add constant_id decoration 2020-09-29 18:07:50 +00:00
constructor_expression.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
constructor_expression.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
continue_statement.cc Remove conditional break/continue. 2020-06-03 16:11:28 +00:00
continue_statement.h Remove conditional break/continue. 2020-06-03 16:11:28 +00:00
continue_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
decorated_variable.cc ast::Variable dumping now indicates is_const 2020-10-23 17:45:50 +00:00
decorated_variable.h [ast] Add constant id helper. 2020-09-29 20:00:00 +00:00
decorated_variable_test.cc [ast] Add constant id helper. 2020-09-29 20:00:00 +00:00
discard_statement.cc [ast] Add DiscardStatement AST node. 2020-07-25 03:34:33 +00:00
discard_statement.h [ast] Add DiscardStatement AST node. 2020-07-25 03:34:33 +00:00
discard_statement_test.cc [ast] Add DiscardStatement AST node. 2020-07-25 03:34:33 +00:00
else_statement.cc Remove StatementList. 2020-07-27 15:25:00 +00:00
else_statement.h [transform] Add BufferArrayAccessors transform 2020-09-29 18:40:40 +00:00
else_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
expression.cc Rename unwrap helpers. 2020-10-28 20:32:22 +00:00
expression.h [ast] Remove IsCast 2020-09-25 18:41:02 +00:00
expression_test.cc [spirv-writer] Generate Unary Op expression. 2020-04-22 00:24:11 +00:00
fallthrough_statement.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
fallthrough_statement.h Remove conditional break/continue. 2020-06-03 16:11:28 +00:00
fallthrough_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
float_literal.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
float_literal.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
float_literal_test.cc Add IntLiteral parent for Sint and Uint literals. 2020-06-02 20:11:54 +00:00
function.cc [type-determiner] Update to work with entry point and function stages. 2020-09-21 17:51:31 +00:00
function.h Add In/Out variables to returned EntryPoint 2020-10-08 18:38:45 +00:00
function_decoration.cc [wgsl-reader] Parse stage decoration 2020-09-21 17:42:10 +00:00
function_decoration.h Doxygen cleanup 2020-10-06 15:35:37 +00:00
function_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
identifier_expression.cc Update builtin methods. 2020-09-22 19:42:13 +00:00
identifier_expression.h Update builtin methods. 2020-09-22 19:42:13 +00:00
identifier_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
if_statement.cc Remove StatementList. 2020-07-27 15:25:00 +00:00
if_statement.h [transform] Add BufferArrayAccessors transform 2020-09-29 18:40:40 +00:00
if_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
int_literal.cc Add IntLiteral parent for Sint and Uint literals. 2020-06-02 20:11:54 +00:00
int_literal.h Add IntLiteral parent for Sint and Uint literals. 2020-06-02 20:11:54 +00:00
int_literal_test.cc Make case selectors an integer value 2020-06-02 20:12:02 +00:00
intrinsic.cc [type-determiner][spirv-writer] Add arrayLength support 2020-10-08 17:01:55 +00:00
intrinsic.h [type-determiner][spirv-writer] Add arrayLength support 2020-10-08 17:01:55 +00:00
literal.cc Make case selectors an integer value 2020-06-02 20:12:02 +00:00
literal.h Make case selectors an integer value 2020-06-02 20:12:02 +00:00
location_decoration.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
location_decoration.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
location_decoration_test.cc [ast] Add constant_id decoration 2020-09-29 18:07:50 +00:00
loop_statement.cc Remove StatementList. 2020-07-27 15:25:00 +00:00
loop_statement.h [transform] Add BufferArrayAccessors transform 2020-09-29 18:40:40 +00:00
loop_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
member_accessor_expression.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
member_accessor_expression.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
member_accessor_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
module.cc [wgsl-reader] Add parsing of named structs. 2020-10-19 15:31:47 +00:00
module.h [wgsl-reader] Add parsing of named structs. 2020-10-19 15:31:47 +00:00
module_test.cc [wgsl-reader] Add parsing of named structs. 2020-10-19 15:31:47 +00:00
node.cc Initial commit 2020-03-02 15:47:43 -05:00
node.h Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
null_literal.cc [spirv-writer] Add null initializers where needed. 2020-05-05 14:21:19 +00:00
null_literal.h Cleanup formatting and linter. 2020-06-16 15:02:50 +00:00
null_literal_test.cc Add IntLiteral parent for Sint and Uint literals. 2020-06-02 20:11:54 +00:00
pipeline_stage.cc Initial commit 2020-03-02 15:47:43 -05:00
pipeline_stage.h Initial commit 2020-03-02 15:47:43 -05:00
return_statement.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
return_statement.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
return_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
scalar_constructor_expression.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
scalar_constructor_expression.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
scalar_constructor_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
set_decoration.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
set_decoration.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
set_decoration_test.cc [ast] Add constant_id decoration 2020-09-29 18:07:50 +00:00
sint_literal.cc Add IntLiteral parent for Sint and Uint literals. 2020-06-02 20:11:54 +00:00
sint_literal.h [transform] Add BufferArrayAccessors transform 2020-09-29 18:40:40 +00:00
sint_literal_test.cc Add IntLiteral parent for Sint and Uint literals. 2020-06-02 20:11:54 +00:00
stage_decoration.cc [wgsl-reader] Parse stage decoration 2020-09-21 17:42:10 +00:00
stage_decoration.h [wgsl-reader] Parse stage decoration 2020-09-21 17:42:10 +00:00
stage_decoration_test.cc [wgsl-reader] Parse stage decoration 2020-09-21 17:42:10 +00:00
statement.cc [ast] Add BlockStatement 2020-07-27 15:25:00 +00:00
statement.h Remove StatementList. 2020-07-27 15:25:00 +00:00
storage_class.cc Remove push constants. 2020-05-06 21:48:23 +00:00
storage_class.h Remove push constants. 2020-05-06 21:48:23 +00:00
stride_decoration.cc [wgsl-reader] Allow array decorations to have multiple blocks. 2020-10-08 19:34:25 +00:00
stride_decoration.h [wgsl-reader] Allow array decorations to have multiple blocks. 2020-10-08 19:34:25 +00:00
stride_decoration_test.cc [wgsl-reader] Allow array decorations to have multiple blocks. 2020-10-08 19:34:25 +00:00
struct.cc [wgsl-reader] Add parsing of named structs. 2020-10-19 15:31:47 +00:00
struct.h Update structs to allow multiple decorations 2020-10-08 18:33:25 +00:00
struct_decoration.cc Initial commit 2020-03-02 15:47:43 -05:00
struct_decoration.h [wgsl-reader] Allow array decorations to have multiple blocks. 2020-10-08 19:34:25 +00:00
struct_member.cc [hlsl-writer] StorageBuffer support. 2020-08-25 21:22:37 +00:00
struct_member.h [hlsl-writer] StorageBuffer support. 2020-08-25 21:22:37 +00:00
struct_member_decoration.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
struct_member_decoration.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
struct_member_offset_decoration.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
struct_member_offset_decoration.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
struct_member_offset_decoration_test.cc Adding support for testing BUILD.gn 2020-04-17 13:18:20 +00:00
struct_member_test.cc Adding support for testing BUILD.gn 2020-04-17 13:18:20 +00:00
struct_test.cc [wgsl-reader] Add parsing of named structs. 2020-10-19 15:31:47 +00:00
switch_statement.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
switch_statement.h Remove conditional break/continue. 2020-06-03 16:11:28 +00:00
switch_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
type_constructor_expression.cc Support the zero initializer syntax. 2020-06-22 20:44:27 +00:00
type_constructor_expression.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
type_constructor_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
uint_literal.cc Add IntLiteral parent for Sint and Uint literals. 2020-06-02 20:11:54 +00:00
uint_literal.h [transform] Add BufferArrayAccessors transform 2020-09-29 18:40:40 +00:00
uint_literal_test.cc Rename the IntLiteral to SintLiteral. 2020-06-02 20:11:44 +00:00
unary_op.cc Initial commit 2020-03-02 15:47:43 -05:00
unary_op.h Initial commit 2020-03-02 15:47:43 -05:00
unary_op_expression.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
unary_op_expression.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
unary_op_expression_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
variable.cc ast::Variable dumping now indicates is_const 2020-10-23 17:45:50 +00:00
variable.h [msl-writer] Emit function constant information 2020-10-06 21:05:18 +00:00
variable_decl_statement.cc Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
variable_decl_statement.h Remove suppressing [chromium-style] errors 2020-04-09 18:52:06 +00:00
variable_decl_statement_test.cc Add File & Range information to tint::Source 2020-10-30 20:44:53 +00:00
variable_decoration.cc [ast] Add constant_id decoration 2020-09-29 18:07:50 +00:00
variable_decoration.h Doxygen cleanup 2020-10-06 15:35:37 +00:00
variable_test.cc Adding support for testing BUILD.gn 2020-04-17 13:18:20 +00:00
workgroup_decoration.cc [ast][spirv-writer][hlsl-writer][wgsl-writer] Add workgroup_size decoration 2020-09-21 00:28:58 +00:00
workgroup_decoration.h [ast][spirv-writer][hlsl-writer][wgsl-writer] Add workgroup_size decoration 2020-09-21 00:28:58 +00:00
workgroup_decoration_test.cc [wgsl-reader] Parse stage decoration 2020-09-21 17:42:10 +00:00