Is there any basic gramer summaries?

I'm really a wholy new programmer language learner, so if there is basic gramer summaries here?thx

You could read the Rust book to get started. It doesn't have a grammar summary and for good reasons (the grammar looks familiar enough to any C++ programmer, but if you approach Rust the same way you''d approach C++, you'd be in trouble soon). That said, the Rust book is a very good gentle introduction for Rust. When I began learning Rust, that's where I learnt it from.

thx

The Rust Reference has chapters for each language construct, and most of those show you the forman syntax.

For example, this is the syntax for expressions.

Syntax
Expression :
ExpressionWithoutBlock
| ExpressionWithBlock

ExpressionWithoutBlock :
OuterAttribute *
(
LiteralExpression
| PathExpression
| OperatorExpression
| GroupedExpression
| ArrayExpression
| AwaitExpression
| IndexExpression
| TupleExpression
| TupleIndexingExpression
| StructExpression
| CallExpression
| MethodCallExpression
| FieldExpression
| ClosureExpression
| ContinueExpression
| BreakExpression
| RangeExpression
| ReturnExpression
| MacroInvocation
)

ExpressionWithBlock :
OuterAttribute *
(
BlockExpression
| AsyncBlockExpression
| UnsafeBlockExpression
| LoopExpression
| IfExpression
| IfLetExpression
| MatchExpression
)

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.