diff --git a/src/syntax_graph.jl b/src/syntax_graph.jl index bada8ca1..bdbf98e0 100644 --- a/src/syntax_graph.jl +++ b/src/syntax_graph.jl @@ -6,7 +6,7 @@ one or several syntax trees. TODO: Global attributes! """ -struct SyntaxGraph{Attrs} +mutable struct SyntaxGraph{Attrs} edge_ranges::Vector{UnitRange{Int}} edges::Vector{NodeId} attributes::Attrs @@ -632,7 +632,7 @@ end #------------------------------------------------------------------------------- # Lightweight vector of nodes ids with associated pointer to graph stored separately. -struct SyntaxList{GraphType, NodeIdVecType} <: AbstractVector{SyntaxTree} +mutable struct SyntaxList{GraphType, NodeIdVecType} <: AbstractVector{SyntaxTree} graph::GraphType ids::NodeIdVecType end