For those who are struggling with Rust's cool syntax, our goal is to provide a TOML parser that's as easy as pointing to a menu and eating fast food.
Rustのイケてる構文に難儀している人のために、メニューを指差してファーストフードを食べるぐらい簡単な操作のTOMLパーサーを提供することを目標とします。
Unstable version. It's a tryal and error process. Specifications will change.
不安定版。 試行錯誤中です。 仕様はコロコロ変わるでしょう。
Tomboy is a pun.
トムボーイ(おてんば娘)は語呂合わせです。
References:
Take a look at the repository.
リポジトリを見てください。
shell
cargo run --example comment
cargo run --example example
cargo run --example inline_table
cargo run --example main
cargo run --example mix_array
cargo run --example spot
cargo run --example table
cargo run --example toml-io-en-a-quick-tour-of-toml-v100rc3
The specifications will gradually solidify.
仕様は少しずつ固めていきます。
You can think that you can't do anything that isn't written here.
ここに書かれていないことは何もできないと思ってもらって構いません。
```rust age = 40 intmax = 2147483647 intmin = -2147483648 weight = 93.5
0x
hex1 = 0xDEADBEEF hex2 = 0xdeadbeef hex3 = 0xdead_beef
0o
oct1 = 0o01234567 oct2 = 0o755
0b
bin1 = 0b11010110
apple = "pie" basicstringempty = "" basicstringescapebackslash = "\" basicstringescapedoublequotation = "\"" basicstringletter = "Hello, world!!" basicstringpunctuation = "., ={}[]'\"\!?" basicstring_tab = "a\tb"
multilinebasicstringletter = """Hello, world!!""" multilinebasicstringpunctuation = """., ={}[]"'""\ !?""" multilinebasicstringtrimstart = """\ The quick brown \ fox jumps over \ the lazy dog.\ """ multilinebasicstringescapedoublequotation = """ \ """ multilinebasicstringtab = """ a\tb """
literalstringempty = '' literalstringletter = 'Hello, world!!' literalstringpunctuation = '., ={}[]"!?'
multilineliteralstringletter = '''Hello, world!!''' multilineliteralstringpunctuation = '''., ={}[]'"\ !?''' multilineliteralstringfirstnewlineistrimmed = ''' The first newline is trimmed in raw strings. All other whitespace is preserved. '''
adult = true student = false
dob = 1979-05-27T07:32:00-08:00 ```
3.14
. 3.14
。0b
- binary.0o
- oct.0x
- hex._
- space.nan
- Not a number.+nan
- Not a number.-nan
- Not a number."abc"
- Basic string."""abc"""
- Multi-line basic string.'abc'
- Literal string.'''abc'''
- multi-line literal string.\r
- caridge return.\n
- line feed.\t
- tab.\\
- backslash.\"
- double quotation.\u0000
- Unicode.\U00000000
- Unicode.1979-05-27T07:32:00-08:00
.