Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
uqdwn
mjtest
Commits
0134c9e0
Commit
0134c9e0
authored
Nov 18, 2016
by
Johannes Bechberger
Browse files
Add binary-trees and fannkuch-redux programs
Bases on sources from the computer language benchmarks game
parent
cc871030
Changes
1
Show whitespace changes
Inline
Side-by-side
preproc/preproc/preprocessor.py
View file @
0134c9e0
...
...
@@ -137,8 +137,8 @@ def is_importable_file(file: str) -> bool:
has_main_method
=
True
if
all
([
has_package
,
has_public_class
,
not
has_main_method
]):
return
True
if
(
has_package
or
has_public_class
)
==
has_main_method
:
raise
PreProcessorError
(
"File '{}' has invalid format: "
"package={}, 'public class'={}, main method={}"
.
format
(
file
,
has_package
,
has_public_class
,
has_main_method
))
#
if (has_package or has_public_class) == has_main_method:
#
raise PreProcessorError("File '{}' has invalid format: "
#
"package={}, 'public class'={}, main method={}"
#
.format(file, has_package, has_public_class, has_main_method))
return
False
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment