preserves_schema_nim: remove dead code
This commit is contained in:
parent
93590f2c07
commit
abcdfa01cd
|
@ -97,7 +97,7 @@ proc isEmbedded(ts: TypeSpec): bool =
|
||||||
|
|
||||||
func isAtomic(r: Ref): bool =
|
func isAtomic(r: Ref): bool =
|
||||||
case r.name.string
|
case r.name.string
|
||||||
of "bool", "float", "double", "int", "string", "bytes", "symbol": true
|
of "bool", "float", "double", "int", "string", "bytes", "symbol": true
|
||||||
else: false
|
else: false
|
||||||
|
|
||||||
proc addAttrs(x: var TypeSpec; y: TypeSpec) =
|
proc addAttrs(x: var TypeSpec; y: TypeSpec) =
|
||||||
|
@ -321,10 +321,6 @@ proc isLiteral(loc: Location; def: Definition): bool =
|
||||||
proc isRef(sp: SimplePattern): bool =
|
proc isRef(sp: SimplePattern): bool =
|
||||||
sp.orKind == SimplePatternKind.Ref
|
sp.orKind == SimplePatternKind.Ref
|
||||||
|
|
||||||
proc isRef(pat: Pattern): bool =
|
|
||||||
pat.orKind == PatternKind.SimplePattern and
|
|
||||||
pat.simplePattern.isRef
|
|
||||||
|
|
||||||
proc isSimple(pat: Pattern): bool =
|
proc isSimple(pat: Pattern): bool =
|
||||||
pat.orKind == PatternKind.SimplePattern
|
pat.orKind == PatternKind.SimplePattern
|
||||||
|
|
||||||
|
@ -372,13 +368,6 @@ proc isDictionary(loc: Location; pat: Pattern): bool =
|
||||||
result = true
|
result = true
|
||||||
else: discard
|
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 =
|
proc isDictionary(loc: Location; def: Definition): bool =
|
||||||
case def.orKind
|
case def.orKind
|
||||||
of DefinitionKind.Pattern:
|
of DefinitionKind.Pattern:
|
||||||
|
|
Loading…
Reference in New Issue