3 Commits
Author SHA1 Message Date
aneurinandClaude Sonnet 5.5 158661eefe Rewrite the code comments for consistent tone and accuracy
Comments only: the tokens of every Go file are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 19:08:00 +00:00
aneurinandClaude Sonnet 5.5 d4b44b6ffb Check edited values, keep comments in place and make edits cheap
- Header.Set, Document.SetDefine and Document.AddHeader return an error for
  a value or name that can't be written as one opcode, define or header, and
  Build returns the same error for what it can't write.
- Set puts a new opcode after the last one's trailing comment, and never
  where text on its line would become part of its value. Delete keeps the
  line breaks it doesn't own.
- Node.Line and Node.Col are replaced by File.Position, which works lines and
  columns out when asked, and a node remembers where it was in its file, so an
  edit no longer renumbers the file or searches it from the start.
- Add FuzzEdit checks that an edited file reads back as its nodes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 18:27:17 +00:00
aneurinandClaude Sonnet 5.5 3d2ab78a32 Add editing, writing and building documents
Header.Get, Set and Delete edit opcodes in place and keep the text around
them. Write and WriteFiles take WriteOptions to inline includes, expand
variables and set line endings. Build makes a document from a typed
Instrument, with options to split regions into included files and to
hoist repeated values into #define directives.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 17:41:34 +00:00