libdasc/parse: Implement single-quoted string unquote

This commit is contained in:
Cheer Xiao 2013-09-18 15:57:42 +08:00
parent 15b48d1125
commit ca00832915

View File

@ -227,7 +227,8 @@ func unquote(token Item) (string, error) {
case ItemBare:
return token.Val, nil
case ItemSingleQuoted:
return token.Val[1:len(token.Val)-1], nil
return strings.Replace(token.Val[1:len(token.Val)-1], "''", "'", -1),
nil
case ItemDoubleQuoted:
return strconv.Unquote(token.Val)
default: