bor
0.2.0
สามารถติดตั้ง bor ได้โดยการรัน pip install bor
ต้องใช้ Python 3.8.0+ จึงจะทำงานได้
ปัจจุบัน bor รองรับคีย์เวิร์ด class
และ def
คำหลัก Python อื่นๆ จะถูกเพิ่มในรุ่นต่อๆ ไป
bor {keyword} {pattern}
ตามค่าเริ่มต้น bor จะทำงานในไดเร็กทอรีปัจจุบันของคุณ คุณสามารถรัน bor ด้วยไฟล์ต้นฉบับหรือไดเร็กทอรีเฉพาะ:
bor {keyword} {pattern} {source_file_or_directory}
ตามค่าเริ่มต้น หาก bor พบข้อผิดพลาด (ไวยากรณ์ ข้อผิดพลาดในการเยื้อง ฯลฯ) ขณะวิเคราะห์ไฟล์ ข้อผิดพลาดนั้นจะหยุดทำงาน หากคุณต้องการละเว้นข้อผิดพลาด คุณสามารถใช้ --ignore-error
หรือ -i
อาร์กิวเมนต์ ตัวอย่างเช่น;
bor class Cat --ignore-error
Cat
เทียบเท่าในนิพจน์ทั่วไปเป็น ^Cat$
bor class Cat
เอาท์พุท:
Cat at examples/test.py:18
.Cat
เทียบเท่ากับนิพจน์ทั่วไปในชื่อ Cat$
bor class .Cat
เอาท์พุท:
Cat at examples/test.py:18
BlueCat at examples/test.py:26
get.
เทียบเท่าในนิพจน์ทั่วไปว่า ^get
bor def get. examples/test.py
เอาท์พุท:
get_value at examples/test.py:5
get_blue_value at examples/test.py:11
get_purple_value at examples/test.py:14
get_meow at examples/test.py:22
.cat.
เทียบเท่าในนิพจน์ทั่วไปเป็น cat+
bor def .cat.
เอาท์พุท:
catch_me_if_you_can at examples/test.py:8
am_i_blue_cat at examples/test.py:30
where_is_the_cat at examples/test.py:38