mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge branch 'css' into docs-intro
This commit is contained in:
@@ -4,7 +4,7 @@ Screen {
|
|||||||
|
|
||||||
#left_pane {
|
#left_pane {
|
||||||
background: red;
|
background: red;
|
||||||
width: 20;
|
width: 20
|
||||||
overflow: scroll scroll;
|
overflow: scroll scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import rich.repr
|
|||||||
from rich.syntax import Syntax
|
from rich.syntax import Syntax
|
||||||
from rich.text import Text
|
from rich.text import Text
|
||||||
|
|
||||||
|
from ._error_tools import friendly_list
|
||||||
from .._loop import loop_last
|
from .._loop import loop_last
|
||||||
|
|
||||||
|
|
||||||
@@ -203,11 +204,13 @@ class Tokenizer:
|
|||||||
line = self.lines[line_no]
|
line = self.lines[line_no]
|
||||||
match = expect.match(line, col_no)
|
match = expect.match(line, col_no)
|
||||||
if match is None:
|
if match is None:
|
||||||
|
expected = friendly_list(" ".join(name.split("_")) for name in expect.names)
|
||||||
|
message = f"Expected one of {expected}.; Did you forget a semicolon at the end of a line?"
|
||||||
raise TokenError(
|
raise TokenError(
|
||||||
self.path,
|
self.path,
|
||||||
self.code,
|
self.code,
|
||||||
(line_no, col_no),
|
(line_no, col_no),
|
||||||
"expected " + ", ".join(name.upper() for name in expect.names),
|
message,
|
||||||
)
|
)
|
||||||
iter_groups = iter(match.groups())
|
iter_groups = iter(match.groups())
|
||||||
next(iter_groups)
|
next(iter_groups)
|
||||||
|
|||||||
Reference in New Issue
Block a user