From 8f96716ac48bd536614c016913d4e4b41c08531b Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 15 Jul 2025 00:03:34 +0800 Subject: [PATCH] =?UTF-8?q?docs:=E4=BC=98=E5=8C=96=E6=95=B0=E5=80=BC?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=92=8C=E5=AD=97=E9=9D=A2=E9=87=8F=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E7=9A=84=20Markdown=20=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整数值类型表格的格式,使其更加简洁易读 - 优化字面量后缀表格的布局,提高可读性 - 统一表格样式,去掉多余的空格和竖线 --- .../Snow-Lang-Grammar-Specification.md.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/Snow-Lang-Syntax/Snow-Lang-Grammar-Specification.md.md b/docs/Snow-Lang-Syntax/Snow-Lang-Grammar-Specification.md.md index a60b3fd..a529bf4 100644 --- a/docs/Snow-Lang-Syntax/Snow-Lang-Grammar-Specification.md.md +++ b/docs/Snow-Lang-Syntax/Snow-Lang-Grammar-Specification.md.md @@ -298,14 +298,14 @@ end loop Snow-Lang 支持下列**数值类型**,用于声明变量、参数、结构体字段、函数返回等: -| 类型名 | 关键字 | 位数 | 描述 | -|-------------|----------|-------|-----------------------------| -| byte8 | byte | 8 | 8 位有符号整数 | -| short16 | short | 16 | 16 位有符号整数 | -| int32 | int | 32 | 32 位有符号整数(默认整数类型)| -| long64 | long | 64 | 64 位有符号整数 | -| float32 | float | 32 | 32 位 IEEE-754 浮点数 | -| double64 | double | 64 | 64 位 IEEE-754 浮点数(默认浮点类型)| +| 类型名 | 关键字 | 位数 | 描述 | +|----------|--------|----|---------------------------| +| byte8 | byte | 8 | 8 位有符号整数 | +| short16 | short | 16 | 16 位有符号整数 | +| int32 | int | 32 | 32 位有符号整数(默认整数类型) | +| long64 | long | 64 | 64 位有符号整数 | +| float32 | float | 32 | 32 位 IEEE-754 浮点数 | +| double64 | double | 64 | 64 位 IEEE-754 浮点数(默认浮点类型) | **说明** * 没有无符号整型,所有整型均为有符号。 @@ -317,14 +317,14 @@ Snow-Lang 支持下列**数值类型**,用于声明变量、参数、结构体 为指定具体类型,可在数值字面量后加后缀字母(大小写均可): -| 后缀 | 类型 | 例子 | -|------|-----------|-----------| -| b | byte | 7b, -2B | -| s | short | 123s | -| i | int | 100i | -| l | long | 5l, 123L | -| f | float | 3.14f | -| d | double | 1.0d | +| 后缀 | 类型 | 例子 | +|----|--------|----------| +| b | byte | 7b, -2B | +| s | short | 123s | +| i | int | 100i | +| l | long | 5l, 123L | +| f | float | 3.14f | +| d | double | 1.0d | - 没有后缀的整数字面量自动为 `int`。 - 没有后缀的浮点字面量自动为 `double`。