Last active
August 2, 2023 16:28
-
-
Save wtokuno/a51dd19f723bc1f0108bed3bd3f0e3df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"Include Guard": { | |
"scope": "c,cpp", | |
"isFileTemplate": true, | |
"prefix": [ | |
"include-guard", | |
"#ifndef" | |
], | |
"body": [ | |
"#ifndef ${WORKSPACE_NAME/(.*)/${1:/upcase}/}_${RELATIVE_FILEPATH/(?:^src[\\/\\\\])?(\\w+)(\\W*)/${1:/upcase}${2:+_}/g}_", | |
"#define ${WORKSPACE_NAME/(.*)/${1:/upcase}/}_${RELATIVE_FILEPATH/(?:^src[\\/\\\\])?(\\w+)(\\W*)/${1:/upcase}${2:+_}/g}_", | |
"", | |
"$0", | |
"", | |
"#endif /* !${WORKSPACE_NAME/(.*)/${1:/upcase}/}_${RELATIVE_FILEPATH/(?:^src[\\/\\\\])?(\\w+)(\\W*)/${1:/upcase}${2:+_}/g}_ */" | |
], | |
"description": "Code snippet for include guard" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment