parseText :: Cursor -> [Element]
parseText cur =
  let term           = stringAttr "term" cur
      variable       = stringAttr "variable" cur
      macro          = stringAttr "macro" cur
      value          = stringAttr "value" cur
      delim          = stringAttr "delimiter" cur
      formatting     = getFormatting cur
      plural         = attrWithDefault "plural" True cur
      textForm       = attrWithDefault "form" Long cur
  in  if not (T.null term)
         then [Term term textForm formatting plural]
         else if not (T.null macro)
              then [Macro macro formatting]
              else if not (T.null variable)
                      then [Variable (T.words variable) textForm formatting delim]
                      else [Const value formatting | not (T.null value)]
parseText :: Cursor -> [Element]
parseText cur =
  let term           = stringAttr "term" cur
      variable       = stringAttr "variable" cur
      macro          = stringAttr "macro" cur
      value          = stringAttr "value" cur
      delim          = stringAttr "delimiter" cur
      formatting     = getFormatting cur
      plural         = attrWithDefault "plural" True cur
      textForm       = attrWithDefault "form" Long cur
  in  if not (T.null term)
         then [Term term textForm formatting plural]
         else if not (T.null macro)
              then [Macro macro formatting]
              else if not (T.null variable)
                      then [Variable (T.words variable) textForm formatting delim]
                      else [Const value formatting | not (T.null value)]
parseText cur =
  let term           = stringAttr "term" cur
      variable       = stringAttr "variable" cur
      macro          = stringAttr "macro" cur
      value          = stringAttr "value" cur
      delim          = stringAttr "delimiter" cur
      formatting     = getFormatting cur
      plural         = attrWithDefault "plural" True cur
      textForm       = attrWithDefault "form" Long cur
  in  if not (T.null term)
         then [Term term textForm formatting plural]
         else if not (T.null macro)
              then [Macro macro formatting]
              else if not (T.null variable)
                      then [Variable (T.words variable) textForm formatting delim]
                      else [Const value formatting | not (T.null value)]