ocaml: phase 1+6 Buffer + parser !x in app args (+3 tests, 425 total)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 48s

Parser fix: at-app-start? and parse-app's loop recognise prefix !
as a deref of the next app arg. So 'List.rev !b' parses as
'(:app List.rev (:deref b))' instead of stalling at !.

Buffer module backed by a ref holding string list:
  create _ = ref []
  add_string b s = b := s :: !b
  contents b = String.concat "" (List.rev !b)
  add_char/length/clear/reset
This commit is contained in:
2026-05-08 16:16:52 +00:00
parent dbe3c6c203
commit 2f271fa6a6
4 changed files with 39 additions and 3 deletions

View File

@@ -366,6 +366,16 @@
let printf fmt = print_string fmt
end ;;
module Buffer = struct
let create _ = ref []
let add_string b s = b := s :: !b
let add_char b c = b := c :: !b
let contents b = String.concat \"\" (List.rev !b)
let length b = String.length (String.concat \"\" (List.rev !b))
let clear b = b := []
let reset = clear
end ;;
module Sys = struct
let os_type = \"SX\"
let word_size = 64