diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-05-13 19:43:14 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-05-13 19:43:14 +0800 |
| commit | c49990610aef6e0b885de2f5dd772c7ed89418a8 (patch) | |
| tree | 582c4e77e33ef85f071826501b289d2667f3268a /doc | |
| parent | 46487a4599d9c8154891c7dc78f5e539a687f1b7 (diff) | |
| download | mruby-c49990610aef6e0b885de2f5dd772c7ed89418a8.tar.gz mruby-c49990610aef6e0b885de2f5dd772c7ed89418a8.zip | |
Add a coding convention file
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/coding_conventions.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/coding_conventions.md b/doc/coding_conventions.md new file mode 100644 index 000000000..646a052eb --- /dev/null +++ b/doc/coding_conventions.md @@ -0,0 +1,24 @@ +# Coding conventions + +How to style your C and Ruby code which you want submit to mruby. + +## C code + +The core part (parser, bytecode-interpreter, core-lib, etc.) of mruby is written in the C programming language. Please note the following hints for your C code: + ++ comply with C99 [ISO/IEC 9899:1999] ++ don't use C++ style comments, only use /* ... */ ++ reduce library dependencies to a minimum ++ insert a break after the method return value: + + int + main(void) + { + ... + } + +## Ruby code + +Parts of the standard library of mruby is written in the Ruby programming language itself. Please note the following hints for your Ruby code: + ++ |
