@@ -31,20 +31,20 @@ struct ExpressionContext<'input, 'temp, 'out> {
31
31
32
32
/// A map from identifiers in scope to the locals/arguments they represent.
33
33
///
34
- /// The handles refer to the [`Function:: locals`] area ; see that field's
34
+ /// The handles refer to the [`locals`] arena ; see that field's
35
35
/// documentation for details.
36
36
///
37
- /// [`Function:: locals`]: ast::Function ::locals
37
+ /// [`locals`]: ExpressionContext ::locals
38
38
local_table : & ' temp mut SymbolTable < & ' input str , Handle < ast:: Local > > ,
39
39
40
40
/// Local variable and function argument arena for the function we're building.
41
41
///
42
- /// Note that the ` Local` here is actually a zero-sized type. The AST keeps
43
- /// all the detailed information about locals - names, types, etc. - in
44
- /// [`LocalDecl`] statements. For arguments, that information is kept in
45
- /// [`arguments`]. This `Arena`'s only role is to assign a unique `Handle`
46
- /// to each of them, and track their definitions' spans for use in
47
- /// diagnostics .
42
+ /// Note that the [`ast:: Local`] here is actually a zero-sized type. This
43
+ /// `Arena`'s only role is to assign a unique `Handle` to each local
44
+ /// identifier, and track its definition's span for use in diagnostics. All
45
+ /// the detailed information about locals - names, types, etc. - is kept in
46
+ /// the [`LocalDecl`] statements we parsed from their declarations. For
47
+ /// arguments, that information is kept in [`arguments`] .
48
48
///
49
49
/// In the AST, when an [`Ident`] expression refers to a local variable or
50
50
/// argument, its [`IdentExpr`] holds the referent's `Handle<Local>` in this
@@ -53,14 +53,15 @@ struct ExpressionContext<'input, 'temp, 'out> {
53
53
/// During lowering, [`LocalDecl`] statements add entries to a per-function
54
54
/// table that maps `Handle<Local>` values to their Naga representations,
55
55
/// accessed via [`StatementContext::local_table`] and
56
- /// [`RuntimeExpressionContext ::local_table`]. This table is then consulted when
56
+ /// [`LocalExpressionContext ::local_table`]. This table is then consulted when
57
57
/// lowering subsequent [`Ident`] expressions.
58
58
///
59
- /// [`LocalDecl`]: StatementKind::LocalDecl
60
- /// [`arguments`]: Function::arguments
61
- /// [`Ident`]: Expression::Ident
62
- /// [`StatementContext::local_table`]: StatementContext::local_table
63
- /// [`RuntimeExpressionContext::local_table`]: RuntimeExpressionContext::local_table
59
+ /// [`LocalDecl`]: ast::StatementKind::LocalDecl
60
+ /// [`arguments`]: ast::Function::arguments
61
+ /// [`Ident`]: ast::Expression::Ident
62
+ /// [`IdentExpr`]: ast::IdentExpr
63
+ /// [`StatementContext::local_table`]: super::lower::StatementContext::local_table
64
+ /// [`LocalExpressionContext::local_table`]: super::lower::LocalExpressionContext::local_table
64
65
locals : & ' out mut Arena < ast:: Local > ,
65
66
66
67
/// Identifiers used by the current global declaration that have no local definition.
0 commit comments