Risescript is a high-level scripting language that combines server-side and client-side capabilities in a unified syntax. It is designed for full-stack web development, removing context-switching between HTML, CSS, JavaScript, and PHP.
Risescript introduces a unified syntax that handles:
HTML templates
CSS styling
JS interactivity
PHP-style backend logic in a modular and consistent block structure.
The language is component-driven and supports reusable UI logic and backend code using the .rise
file extension. Each .rise
file can contain:
Use .rise
files grouped by feature:
Encourages encapsulation using:
<template>
for HTML
<style scoped>
for CSS
<script>
for client JS
<backend>
for PHP
Slots enable flexible templating (like in Web Components or Vue).
Supports native JS inside <script>
blocks:
Risescript compiles to:
HTML for <template>
CSS for <style>
JS for <script>
PHP for <backend>
With a CLI:
Feature | Risescript Support |
---|---|
HTML | β
in <template> |
CSS | β
in <style> |
JS | β
in <script> |
PHP | β
in <backend> |
Modularity | β
<component> and <import> |
Scalability | β Slot-based composition, CLI tools |
Hereβs a complete breakdown of Risescript, including its documentation, compiler outline, and a sample project.
Risescript files use the .rise
extension. Each file may contain the following top-level tags:
<component>
: Wraps a reusable UI module
<template>
: Contains the HTML
<style scoped>
: Contains CSS for this component only
<script>
: Contains client-side JS
<backend>
: Contains PHP-style backend code
<import>
: Includes other .rise
components
Tokenizes the .rise
file
Recognizes tags: <component>
, <template>
, <style>
, <script>
, <backend>
, <import>
Builds an abstract syntax tree
Nodes include: ComponentNode
, TemplateNode
, ScriptNode
, BackendNode
, etc.
Scope styles with a unique hash
Convert reactivity syntax to JavaScript/DOM manipulation
Convert backend logic to PHP
Inline slot content into consuming templates
For each .rise
file:
.html
: from <template>
.css
: from <style scoped>
.js
: from <script>
.php
: from <backend>
Would you like me to:
Build a compiler prototype in Node.js or another language?
Generate a GitHub-style README and install guide?
Set up a REPL or live demo environment?
Let me know how you'd like to proceed!