my-emacs-d/elpa/yasnippet-20160924.2001/snippets/cc-mode/switch
2016-10-20 10:27:10 +02:00

11 lines
230 B
Plaintext

# -*- mode: snippet -*-
# name : switch (...) { case : ... default: ...}
# key: switch
# --
switch (${1:expr}) {
case ${2:constexpr}:${3: \{}
$0
break;
${3:$(if (string-match "\{" yas-text) "\}\n" "")}default:
break;
}