Skip to content

Commit

Permalink
feat: remove c89/99 keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
dy-tea committed Dec 27, 2024
1 parent 774653d commit 184d5bd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/c2v.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ import datatypes
const version = '0.4.1'

// V keywords, that are not keywords in C:
const v_keywords = ['as', 'asm', 'assert', 'atomic', 'break', 'const', 'continue', 'defer', 'else',
'enum', 'false', 'fn', 'for', 'go', 'goto', 'if', 'implements', 'import', 'in', 'interface',
'is', 'isreftype', 'lock', 'match', 'module', 'mut', 'none', 'or', 'pub', 'return', 'rlock',
'select', 'shared', 'sizeof', 'spawn', 'static', 'struct', 'true', 'type', 'typeof', 'union',
'unsafe', 'volatile', '__global', '__offsetof']
const v_keywords = ['as', 'asm', 'assert', 'atomic', 'defer', 'false', 'fn', 'go', 'implements',
'import', 'in', 'interface', 'is', 'isreftype', 'lock', 'match', 'map', 'module', 'mut', 'none',
'or', 'pub', 'rlock', 'select', 'shared', 'spawn', 'string', 'true', 'type', 'typeof', 'unsafe',
'__global', '__offsetof']

// libc fn definitions that have to be skipped (V already knows about them):
const builtin_fn_names = ['fopen', 'puts', 'fflush', 'getline', 'printf', 'memset', 'atoi', 'memcpy',
Expand Down

0 comments on commit 184d5bd

Please sign in to comment.