Changes between Version 2 and Version 3 of CodeDoc
- Timestamp:
- 11/22/10 19:01:46 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodeDoc
v2 v3 46 46 tokenization and code generation is concerned. 47 47 {{{ 48 #!cobra 48 49 numberType = if(.typeProvider, .typeProvider.numberType, DecimalType()) 49 50 # parse literal to same type as numberType … … 56 57 57 58 {{{ 59 #!cobra 58 60 def onWHITESPACE_LINE(tok as IToken) as IToken? 59 61 # Eat these. … … 73 75 described with an inline trailing comment. 74 76 {{{ 77 #!cobra 75 78 var _didLineContinuation as bool # only meaningful after an EOL 76 79 }}} … … 86 89 The most common use for this perhaps is to comment out a block of code. 87 90 {{{ 91 #!cobra 88 92 def startSource(fileName as String, source as String) as Tokenizer 89 93 /# … … 100 104 You can also comment (out) code within a line with inline '''/#... #/''' 101 105 {{{ 106 #!cobra 102 107 x = /# -1 * #/ z * y 103 108 # same as x = z * y … … 118 123 Any subsequent text after the tag is ignored. 119 124 {{{ 125 #!cobra 120 126 # Normally this would warn with a suggestion to remove the trailing () 121 127 callMe() # .nowarnings. I like explicit () for this call … … 130 136 Usually this uses a tag '''TODO:''' followed by the notation. 131 137 {{{ 138 #!cobra 132 139 # TODO: move to CobraCore 133 140 ... … … 146 153 e.g 147 154 {{{ 155 #!cobra 148 156 """This is a single line docstring.""" 149 157 … … 176 184 === Grammar === 177 185 {{{ 186 #!cobra 178 187 """ TEXT """ 179 188 … … 186 195 187 196 {{{ 197 #!cobra 188 198 """Example module showing docstring positions""" 189 199