-
Notifications
You must be signed in to change notification settings - Fork 0
Syntax and Keywords
TumorScript uses an intuitive, indentation-based grammar combined with biological keywords.
| Conventional Concept | TumorScript Keyword | Biological Meaning & Role |
|---|---|---|
var / let
|
dna |
Standard mutable variable subject to entropic decay on each read. |
const |
rna |
Immutable constant, immune to mutation and modification. |
class / struct
|
cell |
Living blueprint defining fields, states, and cellular parameters. |
function / def
|
gene |
Functional expression of cellular logic. Susceptible to contagion. |
new / clone
|
mitosis |
Spawns an independent living cellular instance from a cell blueprint. |
return |
apoptosis |
Clean programmed cell death; terminates execution and returns data. |
import / export
|
metastasis |
Cross-module dissemination of cells and logic across file boundaries. |
try / catch
|
chemo / quarantine
|
Error and entropy containment strategies. |
Variables are dynamically typed but strictly bounded by their genomic type:
# dynamic, mutating variables
dna counter = 0
dna patient_name = "Subject-42"
dna temperature = 98.6
# static, immune constants
rna MAX_THRESHOLD = 150
rna PROTOCOL_NAME = "ISO-TUMOR-99"Reassigning to an rna identifier triggers a fatal runtime error:
IMMUNE_VIOLATION: cannot reassign rna constant 'MAX_THRESHOLD'
Cells declare internal dna and rna fields. Instances are produced via mitosis:
cell CultureSample:
dna density = 1.05
dna cell_count = 1000
rna serial = "CS-2026-X"
gene main():
dna sample_a = mitosis CultureSample()
dna sample_b = mitosis CultureSample()
print("Sample A Count:", sample_a.cell_count)Each instance holds isolated state; field access mutates that specific field.
Genes receive parameters as local variables and terminate via apoptosis:
gene synthesize(sample, factor):
dna adjusted = sample.density * factor
if adjusted > 10.0:
print("Hyper-dense reaction detected!")
apoptosis adjustedTumorScript supports if, elif, else, and while structures:
if patient.heart_rate > 100:
print("Tachycardia alert")
elif patient.heart_rate < 50:
print("Bradycardia alert")
else:
print("Normal rhythm")
while cycle < 10:
cycle = cycle + 1The {} symbols are reserved exclusively for the quarantine block. Using them anywhere else causes an immediate SYNTAX_TUMOR error during lexical analysis.
quarantine {
dna safe_val = volatile_data * 2
print("[STERILE] Safe Value:", safe_val)
}TumorScript Documentation — Biomorphic & Quantum Computing Paradigm. Handle with extreme biological precaution.
- Getting Started
- Language Core
- Architecture
- Cookbook