87bd711079
Build and Package Oraset / build (macos-latest) (push) Waiting to run
Build and Package Oraset / build (ubuntu-latest) (push) Waiting to run
Build and Package Oraset / build (windows-latest) (push) Waiting to run
Build and Package Oraset / release (push) Blocked by required conditions
114 lines
4.1 KiB
PHP
114 lines
4.1 KiB
PHP
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Oraset - 简洁高效的编程语言</title>
|
||
<link rel="stylesheet" href="css/style.css">
|
||
</head>
|
||
<body>
|
||
<div class="layout">
|
||
<nav class="sidebar">
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-section-title">Oraset</div>
|
||
<ul>
|
||
<li><a href="index.php" class="active">首页</a></li>
|
||
<li><a href="download.php">下载</a></li>
|
||
<li><a href="releases.php">历史版本</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-section-title">文档</div>
|
||
<ul>
|
||
<li><a href="docs/index.php?list">文档列表</a></li>
|
||
</ul>
|
||
<ul id="doc-nav-list">
|
||
<li><span class="sidebar-loading">加载中...</span></li>
|
||
</ul>
|
||
</div>
|
||
</nav>
|
||
|
||
<main class="main">
|
||
<h1>Oraset</h1>
|
||
<p>Version: <strong>B-5</strong></p>
|
||
|
||
<h2>关于</h2>
|
||
<p>Oraset 是一个现代化的 C++ 风格脚本语言,功能强大且易于使用。</p>
|
||
|
||
<h2>特性</h2>
|
||
<ul>
|
||
<li>C++ 风格语法设计</li>
|
||
<li>轻量级解释器(纯 C 实现)</li>
|
||
<li>变量定义(let 关键字)</li>
|
||
<li>数组支持(创建、访问、修改)</li>
|
||
<li>自定义函数(proc 关键字)</li>
|
||
<li>条件语句(if-else)</li>
|
||
<li>循环语句(while、for、do-while)</li>
|
||
<li>switch-case 语句</li>
|
||
<li>goto 语句和标签</li>
|
||
<li>break 和 continue</li>
|
||
<li>位运算符(&、|、^、~、<<、>>)</li>
|
||
<li>复合赋值运算符(+=、-=、*=、/=、%=)</li>
|
||
<li>自增自减运算符(++、--)</li>
|
||
<li>结构体(struct)</li>
|
||
<li>枚举(enum)</li>
|
||
<li>类型别名(typedef)</li>
|
||
<li>丰富的内置函数(数学、字符串、数组)</li>
|
||
<li>REPL 交互模式</li>
|
||
<li>跨平台支持(Windows、macOS、Linux)</li>
|
||
</ul>
|
||
|
||
<h2>快速开始</h2>
|
||
<pre>// hello.ora
|
||
echo("Hello, World!");
|
||
let x = 42;
|
||
echo("The value is:", x);
|
||
|
||
// 数组
|
||
let arr = [1, 2, 3];
|
||
echo(arr[0]);
|
||
|
||
// 函数
|
||
proc add(a, b) {
|
||
return a + b;
|
||
}
|
||
echo(add(10, 20));</pre>
|
||
|
||
<p>运行:<code>oraset hello.ora</code></p>
|
||
|
||
<hr>
|
||
<p>Oraset Project © 2026</p>
|
||
</main>
|
||
</div>
|
||
|
||
<script>
|
||
fetch('docs/api.php')
|
||
.then(function(response) {
|
||
if (!response.ok) {
|
||
throw new Error('Network response was not ok');
|
||
}
|
||
return response.json();
|
||
})
|
||
.then(function(data) {
|
||
var navList = document.getElementById('doc-nav-list');
|
||
navList.innerHTML = '';
|
||
if (data.articles && data.articles.length > 0) {
|
||
data.articles.forEach(function(article) {
|
||
var li = document.createElement('li');
|
||
var a = document.createElement('a');
|
||
a.href = 'docs/index.php?doc=' + article.name;
|
||
a.textContent = article.title;
|
||
li.appendChild(a);
|
||
navList.appendChild(li);
|
||
});
|
||
} else {
|
||
navList.innerHTML = '<li><span class="sidebar-loading">暂无文档</span></li>';
|
||
}
|
||
})
|
||
.catch(function(error) {
|
||
console.error('Error loading document list:', error);
|
||
document.getElementById('doc-nav-list').innerHTML = '<li><span class="sidebar-loading">加载失败</span></li>';
|
||
});
|
||
</script>
|
||
</body>
|
||
</html> |