mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Refactor the node stack into its own class. (#2505)
Currently, there's a mix of accessing node_stack_ both directly and indirectly, and there are already several Push/Pop methods to help wrap the behavior. However, there's also direct access because of shifting over time, as well as variations in _how_ the stack is used. This migrates to a separate class in order to make a more specific contract for the API. It cleans up existing uses and adds APIs where needed.
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
||||
// RUN: %{carbon} -v dump semantics-ir %s | %{FileCheck-allow-unmatched}
|
||||
//
|
||||
// Only checks a couple statements in order to minimize manual update churn.
|
||||
// CHECK:STDERR: Push 0: FunctionIntroducer
|
||||
// CHECK:STDERR: Push 0: FunctionIntroducer -> node<invalid>
|
||||
// CHECK:STDERR: AddNode block0: BindName(str0, node{{[0-9]+}})
|
||||
|
||||
fn Foo() {
|
||||
|
||||
Reference in New Issue
Block a user