preserves_schema_nim: remove dead code

This commit is contained in:
Emery Hemingway 2024-01-06 19:26:26 +02:00
parent 93590f2c07
commit abcdfa01cd
1 changed files with 1 additions and 12 deletions

View File

@ -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: