System.Data.SQLite

Check-in [1129095ae9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More output file fixes. The tool is now working.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | vtabDocComments
Files: files | file ages | folders
SHA1: 1129095ae939d8265669b766e1cfd89a6d03156e
User & Date: mistachkin 2015-10-18 05:10:29.575
Context
2015-10-18
05:31
Move the 'vtab.html' file so it does not get included in the CHM build. check-in: 5b3dc8f442 user: mistachkin tags: vtabDocComments
05:10
More output file fixes. The tool is now working. check-in: 1129095ae9 user: mistachkin tags: vtabDocComments
04:31
More fixes to input file processing. Initial work on output file processing. check-in: 17daddabf3 user: mistachkin tags: vtabDocComments
Changes
Unified Diff Ignore Whitespace Patch
Changes to Doc/vtab.tcl.
206
207
208
209
210
211
212




213







214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
    incr index
  }
}

set data [string map [list \r\n \n] [readFile $outputFileName]]
set count 0; set start 0





foreach name [array names methods] {







  if {$count > 0} then {
    set start [string first [string repeat / 71] $data $start]
  }

  set pattern ""

  append pattern ^ {\s{8}} "/// <summary>"
  append pattern {((?:.|\n)*?)}
  append pattern {\n\s{8}} "/// </summary>"
  append pattern {(?:(?:.|\n)*?)}
  append pattern {\n\s{8}[\w]+?\s+?} $name {\($}

  if {[regexp -start \
      $start -line -indices -- $pattern $data dummy indexes]} then {
    set summaryStart [lindex $indexes 0]
    set summaryEnd [lindex $indexes 1]

    set data [string range $data 0 $summaryStart]$methods($name)[string \
        range $data [expr {$summaryEnd + 1}] end]

    incr count; set start [expr {$summaryEnd + 1}]
  } else {
    error "cannot find virtual table method \"$name\" in \"$outputFileName\""
  }
}

if {$count > 0} then {
  # writeFile $outputFileName [string map [list \n \r\n] $data]
  writeFile $outputFileName.new [string map [list \n \r\n] $data]
}

# exit 0







>
>
>
>
|
>
>
>
>
>
>
>












|














|
<


|
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252

253
254
255
    incr index
  }
}

set data [string map [list \r\n \n] [readFile $outputFileName]]
set count 0; set start 0

#
# NOTE: These method names must be processed in the EXACT order that they
#       appear in the output file.
#
foreach name [list \
    xCreate xConnect xBestIndex xDisconnect xDestroy xOpen xClose \
    xFilter xNext xEof xColumn xRowid xUpdate xBegin xSync xCommit \
    xRollback xFindFunction xRename xSavepoint xRelease xRollbackTo] {
  #
  # HACK: This assumes that a line of 71 forward slashes will be present
  #       before each method, except for the first one.
  #
  if {$count > 0} then {
    set start [string first [string repeat / 71] $data $start]
  }

  set pattern ""

  append pattern ^ {\s{8}} "/// <summary>"
  append pattern {((?:.|\n)*?)}
  append pattern {\n\s{8}} "/// </summary>"
  append pattern {(?:(?:.|\n)*?)}
  append pattern {\n\s{8}[\w]+?\s+?} $name {\($}

  if {[regexp -nocase -start \
      $start -line -indices -- $pattern $data dummy indexes]} then {
    set summaryStart [lindex $indexes 0]
    set summaryEnd [lindex $indexes 1]

    set data [string range $data 0 $summaryStart]$methods($name)[string \
        range $data [expr {$summaryEnd + 1}] end]

    incr count; set start [expr {$summaryEnd + 1}]
  } else {
    error "cannot find virtual table method \"$name\" in \"$outputFileName\""
  }
}

if {$count > 0} then {
  writeFile $outputFileName [string map [list \n \r\n] $data]

}

exit 0