mirror of
https://github.com/irmen/prog8.git
synced 2025-02-22 16:29:05 +00:00
add symboldumps to doc makefile
This commit is contained in:
parent
f5d556a7f9
commit
7a6f2ecc8c
@ -29,17 +29,19 @@ class SymbolPrinter(val output: (text: String) -> Unit, val program: Program, va
|
||||
}
|
||||
|
||||
override fun visit(block: Block) {
|
||||
outputln("${block.name} {")
|
||||
val (vars, subs) = block.statements.filter{ it is Subroutine || it is VarDecl }.partition { it is VarDecl }
|
||||
for(variable in vars.sortedBy { (it as VarDecl).name }) {
|
||||
output(" ")
|
||||
variable.accept(this)
|
||||
if(vars.isNotEmpty() || subs.isNotEmpty()) {
|
||||
outputln("${block.name} {")
|
||||
for (variable in vars.sortedBy { (it as VarDecl).name }) {
|
||||
output(" ")
|
||||
variable.accept(this)
|
||||
}
|
||||
for (subroutine in subs.sortedBy { (it as Subroutine).name }) {
|
||||
output(" ")
|
||||
subroutine.accept(this)
|
||||
}
|
||||
outputln("}\n")
|
||||
}
|
||||
for(subroutine in subs.sortedBy { (it as Subroutine).name }) {
|
||||
output(" ")
|
||||
subroutine.accept(this)
|
||||
}
|
||||
outputln("}\n")
|
||||
}
|
||||
|
||||
private fun datatypeString(dt: DataType): String {
|
||||
|
@ -12,9 +12,19 @@ BUILDDIR = build
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
.PHONY: help Makefile symboldumps
|
||||
|
||||
|
||||
symboldumps:
|
||||
p8compile -target atari import-all-atari.p8 -dumpsymbols > skeletons-atari.txt
|
||||
p8compile -target c64 import-all-c64.p8 -dumpsymbols > skeletons-c64.txt
|
||||
p8compile -target c128 import-all-c128.p8 -dumpsymbols > skeletons-c128.txt
|
||||
p8compile -target cx16 import-all-cx16.p8 -dumpsymbols > skeletons-cx16.txt
|
||||
p8compile -target pet32 import-all-pet32.p8 -dumpsymbols > skeletons-pet32.txt
|
||||
p8compile -target virtual import-all-virtual.p8 -dumpsymbols > skeletons-virtual.txt
|
||||
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
11
docs/import-all-atari.p8
Normal file
11
docs/import-all-atari.p8
Normal file
@ -0,0 +1,11 @@
|
||||
; all library modules for the atari compiler target
|
||||
|
||||
%import conv
|
||||
%import cx16logo
|
||||
%import diskio
|
||||
%import math
|
||||
%import prog8_lib
|
||||
%import string
|
||||
%import syslib
|
||||
%import test_stack
|
||||
%import textio
|
12
docs/import-all-c128.p8
Normal file
12
docs/import-all-c128.p8
Normal file
@ -0,0 +1,12 @@
|
||||
; all library modules for the c128 compiler target
|
||||
|
||||
%import conv
|
||||
%import cx16logo
|
||||
%import diskio
|
||||
;;%import floats
|
||||
%import math
|
||||
%import prog8_lib
|
||||
%import string
|
||||
%import syslib
|
||||
%import test_stack
|
||||
%import textio
|
13
docs/import-all-c64.p8
Normal file
13
docs/import-all-c64.p8
Normal file
@ -0,0 +1,13 @@
|
||||
; all library modules for the c64 compiler target
|
||||
|
||||
%import conv
|
||||
%import cx16logo
|
||||
%import diskio
|
||||
%import floats
|
||||
%import graphics
|
||||
%import math
|
||||
%import prog8_lib
|
||||
%import string
|
||||
%import syslib
|
||||
%import test_stack
|
||||
%import textio
|
21
docs/import-all-cx16.p8
Normal file
21
docs/import-all-cx16.p8
Normal file
@ -0,0 +1,21 @@
|
||||
; all library modules for the cx16 compiler target
|
||||
|
||||
%import bmx
|
||||
%import conv
|
||||
%import cx16logo
|
||||
%import diskio
|
||||
%import emudbg
|
||||
%import floats
|
||||
%import gfx2
|
||||
%import graphics
|
||||
%import math
|
||||
%import monogfx
|
||||
%import palette
|
||||
%import prog8_lib
|
||||
%import psg
|
||||
%import sprites
|
||||
%import string
|
||||
%import syslib
|
||||
%import test_stack
|
||||
%import textio
|
||||
%import verafx
|
11
docs/import-all-pet32.p8
Normal file
11
docs/import-all-pet32.p8
Normal file
@ -0,0 +1,11 @@
|
||||
; all library modules for the pet32 compiler target
|
||||
|
||||
%import conv
|
||||
%import cx16logo
|
||||
%import diskio
|
||||
%import math
|
||||
%import prog8_lib
|
||||
%import string
|
||||
%import syslib
|
||||
%import test_stack
|
||||
%import textio
|
14
docs/import-all-virtual.p8
Normal file
14
docs/import-all-virtual.p8
Normal file
@ -0,0 +1,14 @@
|
||||
; all library modules for the virtual compiler target
|
||||
|
||||
%import conv
|
||||
%import cx16logo
|
||||
%import diskio
|
||||
%import emudbg
|
||||
%import floats
|
||||
%import math
|
||||
%import monogfx
|
||||
%import prog8_lib
|
||||
%import string
|
||||
%import syslib
|
||||
%import test_stack
|
||||
%import textio
|
Loading…
x
Reference in New Issue
Block a user