Skip to content

Commit

Permalink
Add PBXShellBuildPhase (#113)
Browse files Browse the repository at this point in the history
* Add test

* Add PBXShellBuildPhase

* Allow quoted shellPath values
  • Loading branch information
dnicolson authored Feb 26, 2024
1 parent 143989f commit 8275d03
Show file tree
Hide file tree
Showing 2 changed files with 4,890 additions and 1 deletion.
34 changes: 33 additions & 1 deletion kin/grammar/PBXProj.g4
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ objects
pbx_reference_proxy_section?
pbx_resources_build_phase_section?
pbx_shell_script_build_phase_section?
pbx_shell_build_phase_section?
pbx_sources_build_phase_section?
pbx_target_dependency_section?
pbx_variant_group_section?
Expand Down Expand Up @@ -129,6 +130,10 @@ pbx_shell_script_build_phase_section
: (pbx_shell_script_build_phase)+
;

pbx_shell_build_phase_section
: (pbx_shell_build_phase)+
;

pbx_sources_build_phase_section
: (pbx_sources_build_phase)+
;
Expand Down Expand Up @@ -380,6 +385,22 @@ pbx_shell_script_build_phase
'}' ';'
;

pbx_shell_build_phase
: REFERENCE '=' '{'
isa_pbx_shell_build_phase
build_action_mask
files
input_file_list_paths
input_paths
name
output_file_list_paths
output_paths
run_only_for_deployment_postprocessing
shell_path
shell
'}' ';'
;

pbx_sources_build_phase
: REFERENCE '=' '{'
isa_pbx_sources_build_phase
Expand Down Expand Up @@ -523,6 +544,10 @@ isa_pbx_shell_script_build_phase
: ISA '=' PBX_SHELL_SCRIPT_BUILD_PHASE ';'
;

isa_pbx_shell_build_phase
: ISA '=' PBX_SHELL_BUILD_PHASE ';'
;

isa_pbx_sources_build_phase
: ISA '=' PBX_SOURCES_BUILD_PHASE ';'
;
Expand Down Expand Up @@ -918,7 +943,11 @@ output_paths
;

shell_path
: SHELL_PATH '=' NON_QUOTED_STRING ';'
: SHELL_PATH '=' any_string ';'
;

shell
: SHELL '=' QUOTED_STRING ';'
;

shell_script
Expand Down Expand Up @@ -1141,6 +1170,7 @@ any_token
| OUTPUT_FILE_LIST_PATHS
| OUTPUT_PATHS
| SHELL_PATH
| SHELL
| SHELL_SCRIPT
| SHOW_ENV_VARS_IN_LOG
| TARGET
Expand Down Expand Up @@ -1193,6 +1223,7 @@ PBX_PROJECT: 'PBXProject';
PBX_REFERENCE_PROXY: 'PBXReferenceProxy';
PBX_RESOURCES_BUILD_PHASE: 'PBXResourcesBuildPhase' | 'PBXRezBuildPhase';
PBX_SHELL_SCRIPT_BUILD_PHASE: 'PBXShellScriptBuildPhase';
PBX_SHELL_BUILD_PHASE: 'PBXShellBuildPhase';
PBX_SOURCES_BUILD_PHASE: 'PBXSourcesBuildPhase';
PBX_TARGET_DEPENDENCY: 'PBXTargetDependency';
PBX_VARIANT_GROUP: 'PBXVariantGroup';
Expand Down Expand Up @@ -1283,6 +1314,7 @@ INPUT_PATHS : 'inputPaths';
OUTPUT_FILE_LIST_PATHS : 'outputFileListPaths';
OUTPUT_PATHS : 'outputPaths';
SHELL_PATH : 'shellPath';
SHELL : 'shell';
SHELL_SCRIPT : 'shellScript';
SHOW_ENV_VARS_IN_LOG : 'showEnvVarsInLog';
TARGET : 'target';
Expand Down
Loading

0 comments on commit 8275d03

Please sign in to comment.