I don't even know rn
This commit is contained in:
@@ -257,9 +257,15 @@ renderNftType [t] = A.String (toText t)
|
|||||||
renderNftType ts = toJSON ts
|
renderNftType ts = toJSON ts
|
||||||
|
|
||||||
exprToVal :: Expr -> Value
|
exprToVal :: Expr -> Value
|
||||||
exprToVal (ELit (LPort p)) = toJSON p
|
exprToVal (ELit (LPort p)) = toJSON p
|
||||||
exprToVal (ELit (LInt n)) = toJSON n
|
exprToVal (ELit (LInt n)) = toJSON n
|
||||||
exprToVal (ELit l) = A.String (toText (renderLit l))
|
exprToVal (ELit (LCIDR ip p))= object
|
||||||
|
[ "prefix" .= object
|
||||||
|
[ "addr" .= A.String (toText (renderLit ip))
|
||||||
|
, "len" .= p
|
||||||
|
]
|
||||||
|
]
|
||||||
|
exprToVal (ELit l) = A.String (toText (renderLit l))
|
||||||
exprToVal (EVar n) = A.String (toText n)
|
exprToVal (EVar n) = A.String (toText n)
|
||||||
exprToVal (EQual ns) = A.String (toText (intercalate "." ns))
|
exprToVal (EQual ns) = A.String (toText (intercalate "." ns))
|
||||||
exprToVal _ = A.String "_"
|
exprToVal _ = A.String "_"
|
||||||
|
|||||||
Reference in New Issue
Block a user