1
需要將每行解析的過程輸出分解爲結構。收集緩衝區的行
sug skProc strutils.capitalize proc (string): string{.noSideEffect.}
sug skProc strutils.quoteIfContainsWhite proc (string): string
sug skProc system.gorge proc (string, string): string
sug skProc system.of proc (T, S): bool{.noSideEffect.}
sug skProc system.definedInScope proc (expr): bool{.noSideEffect.}
sug skIterator system.items iterator (cstring): char{.inline.}
sug skProc system.ord proc (T): int{.noSideEffect.}
該數據位於緩衝區內。那麼如何讀取每一行並將它傳遞給一個返回解析表示並收集所有 行的函數呢?
編輯:
(defstruct nimrod-sug type namespace name signature)
(defun nimrod-parse-suggestion-line (line)
(let ((split (split-string line "[\t\n]")))
(make-nimrod-sug
:type (nth 1 split)
:namespace (first (split-string (nth 2 split) "\\."))
:name (second (split-string (nth 2 split) "\\."))
:signature (nth 3 split))
輸出結構應該是什麼樣子? –