a mini project to validate some basic structures of Swift built using PLY
-
simple data type declaration
- integer
- float
- string
- boolean
-
array-like data types
- list
- tuple
- set
- dictionary
-
selection statements
- if
- else
- elif
- if
-
loop statements
- for
- while
-
functions declaration
- with parameters
- without parameters
- with return type
- without return type
- Clone the repository:
git clone https://github.com/kavin81/SwiftParser
- Navigate to the project directory:
cd SwiftParser
- Install dependencies:
# using pip pip install -r requirements.txt
# using conda/mamba conda env create -f environment.yml
>> python main.py --help
usage: script_name.py [-h] [--file FILE | -f FILE]
Parse Swift code from a file.
optional arguments:
-h, --help show this help message and exit
--file FILE, -f FILE Path to the file containing the Swift code. (default: examples/main.swift)
This project is licensed under the MIT License - see the LICENSE file for details.