actionCond :: Parser ActionCond
actionCond = do
    pos <- getPosition
    let l = sourceLine pos
    act <- action
    cnd <- option Nothing condition
    void semi
    return $ ActionCond l cnd act
  where
    action :: Parser Action
    action = sym2enum actionWords [minBound..maxBound]
    condition = do
        void colon
        cnd <- cond
        return $ Just cnd

----------------------------------------------------------------
actionCond :: Parser ActionCond
actionCond = do
    pos <- getPosition
    let l = sourceLine pos
    act <- action
    cnd <- option Nothing condition
    void semi
    return $ ActionCond l cnd act
  where
    action :: Parser Action
    action = sym2enum actionWords [minBound..maxBound]
    condition = do
        void colon
        cnd <- cond
        return $ Just cnd

----------------------------------------------------------------
actionCond = do
    pos <- getPosition
    let l = sourceLine pos
    act <- action
    cnd <- option Nothing condition
    void semi
    return $ ActionCond l cnd act
  where
    action :: Parser Action
    action = sym2enum actionWords [minBound..maxBound]
    condition = do
        void colon
        cnd <- cond
        return $ Just cnd

----------------------------------------------------------------