Browse Source

docs: replace rust with sabre

github-actions
Garrit Franke 3 years ago
parent
commit
35e88ebbc7
  1. 2
      docs/concepts/SUMMARY.md
  2. 4
      src/lexer/mod.rs

2
docs/concepts/SUMMARY.md

@ -1,5 +1,5 @@
# Common language concepts
This chapter covers concepts that appear in almost every programming language and how they work in Rust. Many programming languages have much in common at their core.
This chapter covers concepts that appear in almost every programming language and how they work in Sabre. Many programming languages have much in common at their core.
Specifically, you’ll learn about variables, basic types, functions, comments, and control flow. These foundations will be in every Sabre program, and learning them early will give you a strong core to start from.

4
src/lexer/mod.rs

@ -172,15 +172,11 @@ pub fn is_whitespace(c: char) -> bool {
}
/// True if `c` is valid as a first character of an identifier.
/// See [Rust language reference](https://doc.rust-lang.org/reference/identifiers.html) for
/// a formal definition of valid identifier name.
pub fn is_id_start(c: char) -> bool {
('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '_'
}
/// True if `c` is valid as a non-first character of an identifier.
/// See [Rust language reference](https://doc.rust-lang.org/reference/identifiers.html) for
/// a formal definition of valid identifier name.
pub fn is_id_continue(c: char) -> bool {
('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_'
}

Loading…
Cancel
Save