resolve
This commit is contained in:
commit
eba9308974
|
@ -252,6 +252,7 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2020/04/23, martinvw, Martin van Wingerden, martin@martinvw.nl
|
||||
2020/04/30, TristonianJones, Tristan Swadell, tswadell@google.com
|
||||
2020/05/06, iammosespaulr, Moses Paul R, iammosespaulr@gmail.com
|
||||
2020/05/10, gomerser, Erik Gomersbach, gomerser@gomersba.ch
|
||||
2020/06/04, sigmasoldi3r, Pablo Blanco, pablobc.1995@gmail.com
|
||||
2020/05/25, graknol, Sindre van der Linden, graknol@gmail.com
|
||||
2020/05/31, d-markey, David Markey, dmarkey@free.fr
|
||||
|
@ -263,4 +264,4 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2020/09/12, Clcanny, Charles Ruan, a837940593@gmail.com
|
||||
2020/09/15, rmcgregor1990, Robert McGregor, rmcgregor1990@gmail.com
|
||||
2020/09/16, trenki2, Markus Trenkwalder, trenki2[at]gmx[dot]net
|
||||
2020/10/08, Marti2203, Martin Mirchev, mirchevmartin2203@gmail.com
|
||||
2020/10/08, Marti2203, Martin Mirchev, mirchevmartin2203@gmail.com
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
||||
* Use of this file is governed by the BSD 3-clause license that
|
||||
* can be found in the LICENSE.txt file in the project root.
|
||||
*/
|
||||
import Foundation
|
||||
|
||||
public class ParseTreeProperty<V> {
|
||||
var annotations = Dictionary<ObjectIdentifier, V>()
|
||||
|
||||
public init() {}
|
||||
|
||||
open func get(_ node: ParseTree) -> V? { return annotations[ObjectIdentifier(node)] }
|
||||
open func put(_ node: ParseTree, _ value: V) { annotations[ObjectIdentifier(node)] = value }
|
||||
open func removeFrom(_ node: ParseTree) { annotations.removeValue(forKey: ObjectIdentifier(node)) }
|
||||
}
|
Loading…
Reference in New Issue