From abcdfa01cd87e0944fb6e37175a548990330ee80 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 6 Jan 2024 19:26:26 +0200 Subject: [PATCH] preserves_schema_nim: remove dead code --- src/preserves/preserves_schema_nim.nim | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/preserves/preserves_schema_nim.nim b/src/preserves/preserves_schema_nim.nim index 67e119d..bab2e99 100644 --- a/src/preserves/preserves_schema_nim.nim +++ b/src/preserves/preserves_schema_nim.nim @@ -97,7 +97,7 @@ proc isEmbedded(ts: TypeSpec): bool = func isAtomic(r: Ref): bool = case r.name.string - of "bool", "float", "double", "int", "string", "bytes", "symbol": true + of "bool", "float", "double", "int", "string", "bytes", "symbol": true else: false proc addAttrs(x: var TypeSpec; y: TypeSpec) = @@ -321,10 +321,6 @@ proc isLiteral(loc: Location; def: Definition): bool = proc isRef(sp: SimplePattern): bool = sp.orKind == SimplePatternKind.Ref -proc isRef(pat: Pattern): bool = - pat.orKind == PatternKind.SimplePattern and - pat.simplePattern.isRef - proc isSimple(pat: Pattern): bool = pat.orKind == PatternKind.SimplePattern @@ -372,13 +368,6 @@ proc isDictionary(loc: Location; pat: Pattern): bool = result = true else: discard -proc isDictionary(loc: Location; defAnd: DefinitionAnd): bool = - result = - isDictionary(loc, defAnd.field0.pattern0.pattern) and - isDictionary(loc, defAnd.field0.pattern1.pattern) - for np in defAnd.field0.patternN: - if result: result = isDictionary(loc, np.pattern) - proc isDictionary(loc: Location; def: Definition): bool = case def.orKind of DefinitionKind.Pattern: