Skip to content

Commit

Permalink
Whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayanaka-98 committed Dec 20, 2024
1 parent 8433487 commit 7973a93
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import:jac module2 as mod;
import:jac from module3 { foo as f, bar }
```

The ```:jac``` annotation informs the jac compiler that it should be importing a jac module. The other main difference from regular python syntax is the use of ```from``` keyword which is used before the module unlike in python and all entities imported from the module are placed within curly braces.
The ```:jac``` annotation informs the jac compiler that it should be importing a jac module. The other main difference from regular python syntax is the use of ```from``` keyword which is used before the module unlike in python and all entities imported from the module are placed within curly braces.

=== "import:py"
```jac linenums="1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ can process_data(id: int) -> dict{
# Integer and float
count: int = 42;
price: float = 19.99;
# String and boolean
name: str = "item";
active: bool = True;
# List and set
items: list = [1, 2, 3];
unique_tags: set = {"red", "blue"};
# Tuple and dictionary
coords: tuple = (10, 20);
details: dict = {"id": id, "name": name, "price": price,
"tags": list(unique_tags)};
details: dict = {"id": id, "name": name, "price": price,
"tags": list(unique_tags)};
}
with entry{
Expand All @@ -42,7 +42,7 @@ obj UserProfile{
has email: str;
has age: int = 0;
has interests: list[str] = [];
"""Validates and processes user data after initialization"""
can post_init(self) -> None{
self.username = self.username.lower();
Expand Down
2 changes: 1 addition & 1 deletion jac/support/jac-lang.org/docs/for_coders/tools/cli.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# **Jac Language Command Line Interface (CLI)**

Jac Language CLI is with a variety of commands to facilitate users. Additionally, Jac language offers users the ability to define custom CLI commands through plugins. This document aims to provide an overview of each command along with clear usage instructions. Jac CLI can ba accessed using bash commands as well as by bashing ```jac``` which will start the Jac CLI.
Jac Language CLI is with a variety of commands to facilitate users. Additionally, Jac language offers users the ability to define custom CLI commands through plugins. This document aims to provide an overview of each command along with clear usage instructions. Jac CLI can ba accessed using bash commands as well as by bashing ```jac``` which will start the Jac CLI.

> Type "help" on Jac CLI and see!
Expand Down
3 changes: 1 addition & 2 deletions jac/support/jac-lang.org/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ nav:
- "for_coders/tools/testing.md"
- "for_coders/tools/jac_streamlit.md"
- "for_coders/tools/cli.md"

- For contributors:
- "for_contributors/contrib.md"
- "for_contributors/internals.md"
Expand Down Expand Up @@ -129,7 +128,7 @@ markdown_extensions:
# - pymdownx.emoji:
# emoji_index: !!python/name:material.extensions.emoji.twemoji
# emoji_generator: !!python/name:material.extensions.emoji.to_svg

extra_css:
- extra.css

Expand Down

0 comments on commit 7973a93

Please sign in to comment.